[packages] mpd: ship avahi files added in [21054], make dependency on alsa-lib conditional, more cleanup

git-svn-id: svn://svn.openwrt.org/openwrt/packages@21098 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2010-04-23 01:13:11 +00:00
parent cf1e49cc67
commit af6a8d2439

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mpd PKG_NAME:=mpd
PKG_VERSION:=0.15.8 PKG_VERSION:=0.15.8
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/musicpd PKG_SOURCE_URL:=@SF/musicpd
@ -22,38 +22,34 @@ include $(INCLUDE_DIR)/package.mk
define Package/mpd define Package/mpd
SECTION:=sound SECTION:=sound
CATEGORY:=Sound CATEGORY:=Sound
# libvorbis and therewith libogg are needed for shout support
DEPENDS:=+libflac +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad +libvorbisidec +libpthread +glib2 +libmms +libcurl +libshout +alsa-lib +libvorbis
TITLE:=Music Player Daemon TITLE:=Music Player Daemon
URL:=http://www.musicpd.org/ URL:=http://www.musicpd.org/
# libvorbis and therewith libogg are needed for shout support
DEPENDS:= \
+AUDIO_SUPPORT:alsa-lib \
+BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
+glib2 +libcurl +libflac +libmms +libpthread +libshout \
+libvorbis +libvorbisidec
endef endef
define Package/mpd/description define Package/mpd/description
MPD is a music player supporting flac, mp3 and ogg files. MPD is a music player supporting flac, mp3 and ogg files. It is
It is typically controlled over a network using one of it's many typically controlled over a network using one of it's many clients
clients including mpc(console), gmpc(gnome), phpmp(php) etc. including mpc(console), gmpc(gnome), phpmp(php), etc...
endef endef
define Package/mpd/conffiles define Package/mpd/conffiles
/etc/avahi/services/mpd.service
/etc/mpd.conf /etc/mpd.conf
endef endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/lib/libintl/include/ \
-I$(STAGING_DIR)/usr/lib/libiconv/include/
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
-L$(STAGING_DIR)/usr/lib/libiconv/lib/
# oggflac is not compatible with tremor # oggflac is not compatible with tremor
CONFIGURE_ARGS+= \ CONFIGURE_ARGS += \
--$(if $(CONFIG_BUILD_PATENTED),enable-mad,disable-mad) \ $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
--enable-alsa \ $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
--enable-audiofile \ --enable-audiofile \
--disable-mpc \ --disable-mpc \
--$(if $(CONFIG_BUILD_PATENTED),enable-aac,disable-aac) \ $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
--disable-lsr \ --disable-lsr \
--disable-ao \ --disable-ao \
--disable-mvp \ --disable-mvp \
@ -62,6 +58,11 @@ CONFIGURE_ARGS+= \
--enable-flac \ --enable-flac \
--enable-vorbis \ --enable-vorbis \
--disable-oggflac \ --disable-oggflac \
--disable-cue \
--disable-jack \
--disable-modplug \
--disable-pulse \
--disable-sidplay \
--disable-sqlite \ --disable-sqlite \
--enable-shout \ --enable-shout \
--enable-id3 \ --enable-id3 \
@ -76,18 +77,25 @@ CONFIGURE_ARGS+= \
--with-tremor=yes \ --with-tremor=yes \
--with-faad="$(STAGING_DIR)/usr" \ --with-faad="$(STAGING_DIR)/usr" \
# use gcc instead of g++ to avoid unnecessary linking against libstdc++
TARGET_CXX=$(TARGET_CC)
TARGET_CFLAGS+=-std=gnu99
CONFIGURE_VARS += \ CONFIGURE_VARS += \
FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \ FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \ FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
$(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \ $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
$(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \ $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
TARGET_CFLAGS += \
-std=gnu99 \
-I$(STAGING_DIR)/usr/lib/libintl/include/ \
-I$(STAGING_DIR)/usr/lib/libiconv/include/ \
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
-L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
# use gcc instead of g++ to avoid unnecessary linking against libstdc++
TARGET_CXX:=$(TARGET_CC)
define Package/mpd/install define Package/mpd/install
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
@ -95,6 +103,8 @@ define Package/mpd/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef endef
$(eval $(call BuildPackage,mpd)) $(eval $(call BuildPackage,mpd))