[packages] mpd: split in 2 variants -full & -mini (closes: )

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28524 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-10-22 18:03:13 +00:00
parent bf3398b58a
commit 310ff6bea8

@ -8,75 +8,127 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mpd PKG_NAME:=mpd
PKG_VERSION:=0.16.1 PKG_VERSION:=0.16.5
PKG_RELEASE:=1 PKG_RELEASE:=1
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
PKG_MD5SUM:=4d07459125ab0154c5b4fe364331498a PKG_MD5SUM:=f7564cff12035f6a1112cce770655df7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
CONFIG_IPV6 \
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/nls.mk
define Package/mpd define Package/mpd/Default
SECTION:=sound SECTION:=sound
CATEGORY:=Sound CATEGORY:=Sound
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:= +glib2 +libcurl +libpthread \
DEPENDS:= \ +libflac +BUILD_PATENTED:libmad +libvorbisidec
endef
define Package/mpd/Default/description
Music Player Daemon (MPD) is a flexible, powerful, server-side
application for playing music. It is typically controlled over a
network using one of it's many clients including mpc (console),
gmpc (gnome), phpmp (php), etc...
endef
define Package/mpd-full
$(call Package/mpd/Default)
TITLE+= (full)
DEPENDS+= \
+AUDIO_SUPPORT:alsa-lib \ +AUDIO_SUPPORT:alsa-lib \
+libaudiofile \ +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
+BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \ +libmms +libogg +libshout +libsndfile +libvorbis
+glib2 +libcurl +libflac +libmms +libpthread +libshout \ PROVIDES:=mpd
+libvorbis +libvorbisidec +libid3tag VARIANT:=full
endef endef
define Package/mpd/description define Package/mpd-full/description
MPD is a music player supporting flac, mp3 and ogg files. It is $(call Package/mpd/Default/description)
typically controlled over a network using one of it's many clients .
including mpc(console), gmpc(gnome), phpmp(php), etc... This package contains a full-blown Music Player Daemon.
endef endef
define Package/mpd/conffiles define Package/mpd-full/conffiles
/etc/avahi/services/mpd.service /etc/avahi/services/mpd.service
/etc/mpd.conf /etc/mpd.conf
endef endef
# oggflac is not compatible with tremor
define Package/mpd-mini
$(call Package/mpd/Default)
TITLE+= (mini)
PROVIDES:=mpd
VARIANT:=mini
endef
define Package/mpd-mini/description
$(call Package/mpd/Default/description)
.
This package contains a minimal Music Player Daemon, with support for
only Flac, MP3 & OGG media types & only file: & http: protocols.
endef
define Package/mpd-mini/conffiles
/etc/mpd.conf
endef
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \
$(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \ --disable-debug \
--enable-audiofile \ --disable-documentation \
--disable-mpc \ --disable-gprof \
$(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \ --disable-test \
--disable-lsr \ --disable-werror \
\
--disable-ao \ --disable-ao \
--disable-mvp \ --disable-bzip2 \
--disable-lame-encoder \
--disable-ffmpeg \
--enable-flac \
--enable-vorbis \
--disable-oggflac \
--disable-cue \ --disable-cue \
--disable-ffado \
--disable-fluidsynth \
--disable-gme \
--disable-inotify \
--disable-iso9660 \
--disable-jack \ --disable-jack \
--disable-lame-encoder \
--disable-libwrap \
--disable-lsr \
--disable-mikmod \
--disable-modplug \ --disable-modplug \
--disable-mpc \
--disable-mpg123 \
--disable-mvp \
--disable-openal \
--disable-pulse \ --disable-pulse \
--disable-sidplay \ --disable-sidplay \
--disable-solaris-output \
--disable-sqlite \ --disable-sqlite \
--enable-shout \ --disable-twolame-encoder \
--enable-id3 \ --disable-wave-encoder \
--enable-lastfm \ --disable-wavpack \
--enable-mms \ --disable-wildmidi \
--enable-curl \ --disable-zzip \
--disable-oss \
--with-zeroconf=no \ --with-zeroconf=no \
--disable-test \ \
--with-tremor=yes \ --enable-curl \
--with-faad="$(STAGING_DIR)/usr" \ --enable-flac \
--enable-httpd-output \
$(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
$(call autoconf_bool,CONFIG_AUDIO_SUPPORT,oss) \
--enable-tcp \
--enable-un \
CONFIGURE_VARS += \ CONFIGURE_VARS += \
FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \ FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
@ -90,15 +142,70 @@ TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
# use gcc instead of g++ to avoid unnecessary linking against libstdc++ # use gcc instead of g++ to avoid unnecessary linking against libstdc++
TARGET_CXX:=$(TARGET_CC) TARGET_CXX:=$(TARGET_CC)
ifeq ($(BUILD_VARIANT),full)
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
$(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
--enable-audiofile \
--enable-fifo \
--enable-ffmpeg \
--enable-id3 \
--enable-lastfm \
--enable-mms \
--enable-oggflac \
--enable-pipe-output \
--enable-recorder-output \
--enable-shout \
--enable-sndfile \
--enable-vorbis \
--enable-vorbis-encoder \
--with-faad="$(STAGING_DIR)/usr" \
--with-tremor=no \
endif
ifeq ($(BUILD_VARIANT),mini)
# oggflac is not compatible with tremor
CONFIGURE_ARGS += \
--disable-aac \
--disable-alsa \
--disable-audiofile \
--disable-fifo \
--disable-ffmpeg \
--disable-id3 \
--disable-lastfm \
--disable-mms \
--disable-oggflac \
--disable-pipe-output \
--disable-recorder-output \
--disable-shout \
--disable-sndfile \
--disable-vorbis \
--disable-vorbis-encoder \
--with-tremor=yes \
endif
define Package/mpd/install define Package/mpd/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
$(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
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(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)) define Package/mpd-full/install
$(call Package/mpd/install,$1)
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
endef
define Package/mpd-mini/install
$(call Package/mpd/install,$1)
endef
$(eval $(call BuildPackage,mpd-full))
$(eval $(call BuildPackage,mpd-mini))