| 1 | # $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
|
|---|
| 2 |
|
|---|
| 3 | include $(TOPDIR)/rules.mk
|
|---|
| 4 |
|
|---|
| 5 | PKG_NAME:=mpd
|
|---|
| 6 | PKG_VERSION:=0.11.5
|
|---|
| 7 | PKG_RELEASE:=1
|
|---|
| 8 | PKG_MD5SUM:=1a9a1a9d31f00a43838b3752024f7ebe
|
|---|
| 9 |
|
|---|
| 10 | PKG_SOURCE_URL:=http://mercury.chem.pitt.edu/~shank
|
|---|
| 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | PKG_CONFIGURE_OPTIONS := \
|
|---|
| 15 | --disable-alsa \
|
|---|
| 16 | --disable-shout \
|
|---|
| 17 | --disable-mod \
|
|---|
| 18 | --disable-audiofile \
|
|---|
| 19 | --disable-iconv \
|
|---|
| 20 | --disable-mpc \
|
|---|
| 21 | --disable-aac \
|
|---|
| 22 |
|
|---|
| 23 | ifneq ($(BR2_COMPILE_MPD_WITH_MP3),)
|
|---|
| 24 | PKG_DEPENDS += libid3tag libmad
|
|---|
| 25 | PKG_CONFIGURE_OPTIONS += \
|
|---|
| 26 | --with-id3tag-includes=$(STAGING_DIR)/usr/include \
|
|---|
| 27 | --with-id3tag-libraries=$(STAGING_DIR)/usr/lib \
|
|---|
| 28 | --with-mad-includes=$(STAGING_DIR)/usr/include \
|
|---|
| 29 | --with-mad-libraries=$(STAGING_DIR)/usr/lib
|
|---|
| 30 | else
|
|---|
| 31 | PKG_CONFIGURE_OPTIONS += --disable-id3 --disable-mp3
|
|---|
| 32 | endif
|
|---|
| 33 |
|
|---|
| 34 | ifneq ($(BR2_COMPILE_MPD_WITH_OGG),)
|
|---|
| 35 | PKG_DEPENDS += libvorbisidec
|
|---|
| 36 | PKG_CONFIGURE_OPTIONS += \
|
|---|
| 37 | --with-tremor \
|
|---|
| 38 | --with-tremor-includes=$(STAGING_DIR)/usr/include \
|
|---|
| 39 | --with-tremor-libraries=$(STAGING_DIR)/usr/lib
|
|---|
| 40 | else
|
|---|
| 41 | PKG_CONFIGURE_OPTIONS += --disable-ogg
|
|---|
| 42 | endif
|
|---|
| 43 |
|
|---|
| 44 | ifneq ($(BR2_COMPILE_MPD_WITH_FLAC),)
|
|---|
| 45 | PKG_DEPENDS += libflac
|
|---|
| 46 | PKG_CONFIGURE_OPTIONS += \
|
|---|
| 47 | --with-libFLAC-includes=$(STAGING_DIR)/usr/include \
|
|---|
| 48 | --with-libFLAC-libraries=$(STAGING_DIR)/usr/lib
|
|---|
| 49 | else
|
|---|
| 50 | PKG_CONFIGURE_OPTIONS += --disable-flac
|
|---|
| 51 | endif
|
|---|
| 52 |
|
|---|
| 53 | COMMA:= ,
|
|---|
| 54 | EMPTY:=
|
|---|
| 55 | SPACE:= $(EMPTY) $(EMPTY)
|
|---|
| 56 | PKG_DEPENDS:=$(subst $(SPACE),$(COMMA)$(SPACE),$(sort $(PKG_DEPENDS)))
|
|---|
| 57 |
|
|---|
| 58 | include $(TOPDIR)/package/rules.mk
|
|---|
| 59 |
|
|---|
| 60 | $(eval $(call PKG_template,MPD,mpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 61 |
|
|---|
| 62 | $(WRKBUILD)/.configured:
|
|---|
| 63 | (cd $(WRKBUILD); \
|
|---|
| 64 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 65 | CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|---|
| 66 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 67 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 68 | ./configure \
|
|---|
| 69 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 70 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 71 | --build=$(GNU_HOST_NAME) \
|
|---|
| 72 | --program-prefix="" \
|
|---|
| 73 | --program-suffix="" \
|
|---|
| 74 | --prefix=/usr \
|
|---|
| 75 | --exec-prefix=/usr \
|
|---|
| 76 | --bindir=/usr/bin \
|
|---|
| 77 | --datadir=/usr/share \
|
|---|
| 78 | --includedir=/usr/include \
|
|---|
| 79 | --infodir=/usr/share/info \
|
|---|
| 80 | --libdir=/usr/lib \
|
|---|
| 81 | --libexecdir=/usr/lib \
|
|---|
| 82 | --localstatedir=/var \
|
|---|
| 83 | --mandir=/usr/share/man \
|
|---|
| 84 | --sbindir=/usr/sbin \
|
|---|
| 85 | --sysconfdir=/etc \
|
|---|
| 86 | $(PKG_CONFIGURE_OPTIONS) \
|
|---|
| 87 | );
|
|---|
| 88 | touch $@
|
|---|
| 89 |
|
|---|
| 90 | $(WRKBUILD)/.built:
|
|---|
| 91 | rm -rf $(WRKINST)
|
|---|
| 92 | mkdir -p $(WRKINST)
|
|---|
| 93 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 94 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 95 | DESTDIR="$(WRKINST)" \
|
|---|
| 96 | all install
|
|---|
| 97 | touch $@
|
|---|
| 98 |
|
|---|
| 99 | $(IPKG_MPD):
|
|---|
| 100 | install -d -m0755 $(IDIR_MPD)/usr/bin
|
|---|
| 101 | install -d -m0755 $(IDIR_MPD)/etc
|
|---|
| 102 | $(CP) $(WRKINST)/usr/bin/mpd $(IDIR_MPD)/usr/bin
|
|---|
| 103 | $(CP) $(WRKBUILD)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf
|
|---|
| 104 | echo "Depends: $(PKG_DEPENDS)" >> $(IDIR_MPD)/CONTROL/control
|
|---|
| 105 | $(RSTRIP) $(IDIR_MPD)
|
|---|
| 106 | $(IPKG_BUILD) $(IDIR_MPD) $(PACKAGE_DIR)
|
|---|
| 107 |
|
|---|
| 108 | mostlyclean:
|
|---|
| 109 | make -C $(WRKBUILD) clean
|
|---|
| 110 | rm $(WRKBUILD)/.built
|
|---|