3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=65e62cc813f2186dff0f96f164a853f8
10 PKG_SOURCE_URL
:=http
://users.tpg.com.au
/davico
/openwrt
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 PKG_CONFIGURE_OPTIONS
:= \
26 ifneq ($(BR2_PACKAGE_MPD_MP3
),)
27 PKG_DEPENDS
+= libid3tag libmad
28 PKG_CONFIGURE_OPTIONS
+= \
29 --with-id3tag-includes
=$(STAGING_DIR
)/usr
/include \
30 --with-id3tag-libraries
=$(STAGING_DIR
)/usr
/lib \
31 --with-mad-includes
=$(STAGING_DIR
)/usr
/include \
32 --with-mad-libraries
=$(STAGING_DIR
)/usr
/lib
34 PKG_CONFIGURE_OPTIONS
+= --disable-id3
--disable-mp3
37 ifneq ($(BR2_PACKAGE_MPD_OGG
),)
38 PKG_DEPENDS
+= libvorbisidec
39 PKG_CONFIGURE_OPTIONS
+= \
41 --with-tremor-includes
=$(STAGING_DIR
)/usr
/include \
42 --with-tremor-libraries
=$(STAGING_DIR
)/usr
/lib
44 PKG_CONFIGURE_OPTIONS
+= --disable-ogg
47 ifneq ($(BR2_PACKAGE_MPD_FLAC
),)
48 PKG_DEPENDS
+= libflac
49 PKG_CONFIGURE_OPTIONS
+= \
50 --with-libFLAC-includes
=$(STAGING_DIR
)/usr
/include \
51 --with-libFLAC-libraries
=$(STAGING_DIR
)/usr
/lib
53 PKG_CONFIGURE_OPTIONS
+= --disable-flac
58 SPACE
:= $(EMPTY
) $(EMPTY
)
59 PKG_DEPENDS
:=$(subst $(SPACE
),$(COMMA
)$(SPACE
),$(sort $(PKG_DEPENDS
)))
61 include $(TOPDIR
)/package
/rules.mk
63 $(eval
$(call PKG_template
,MPD
,mpd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
65 $(PKG_BUILD_DIR
)/.configured
:
66 (cd
$(PKG_BUILD_DIR
); \
67 $(TARGET_CONFIGURE_OPTS
) \
68 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
69 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
70 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
72 --target
=$(GNU_TARGET_NAME
) \
73 --host
=$(GNU_TARGET_NAME
) \
74 --build
=$(GNU_HOST_NAME
) \
80 --datadir=/usr
/share \
81 --includedir=/usr
/include \
82 --infodir=/usr
/share
/info \
84 --libexecdir
=/usr
/lib \
85 --localstatedir
=/var \
86 --mandir=/usr
/share
/man \
89 $(PKG_CONFIGURE_OPTIONS
) \
93 $(PKG_BUILD_DIR
)/.built
:
94 rm -rf
$(PKG_INSTALL_DIR
)
95 mkdir
-p
$(PKG_INSTALL_DIR
)
96 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
97 $(TARGET_CONFIGURE_OPTS
) \
98 DESTDIR
="$(PKG_INSTALL_DIR)" \
103 install -d
-m0755
$(IDIR_MPD
)/usr
/bin
104 install -d
-m0755
$(IDIR_MPD
)/etc
105 cp
-fp
$(PKG_INSTALL_DIR
)/usr
/bin
/mpd
$(IDIR_MPD
)/usr
/bin
106 cp
-fp
$(PKG_BUILD_DIR
)/doc
/mpdconf.example
$(IDIR_MPD
)/etc
/mpd.conf
107 echo
"Depends: $(PKG_DEPENDS)" >> $(IDIR_MPD
)/CONTROL
/control
108 $(RSTRIP
) $(IDIR_MPD
)
109 $(IPKG_BUILD
) $(IDIR_MPD
) $(PACKAGE_DIR
)
112 make
-C
$(PKG_BUILD_DIR
) clean
113 rm $(PKG_BUILD_DIR
)/.built