2 # Copyright (C) 2015-2016 Ted Hess
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=http
://www.musicpd.org
/download
/mpd
/0.19/
16 PKG_MD5SUM
:=6e4fca9a9c26dad08b61bac9a91802db
17 PKG_MAINTAINER
:=Ted Hess
<thess@kitschensync.net
>
20 PKG_LICENSE_FILES
:=COPYING
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
25 PKG_CONFIG_DEPENDS
:= \
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/nls.mk
33 define Package
/mpd
/Default
36 TITLE
:=Music Player Daemon
37 URL
:=http
://www.musicpd.org
/
38 DEPENDS
:= +glib2
+libcurl
+libpthread
+libmpdclient
+libstdcpp
$(ICONV_DEPENDS
) \
39 +libflac
+BUILD_PATENTED
:libmad
+libvorbisidec
+AUDIO_SUPPORT
:alsa-lib \
40 +boost
+boost-container
+libexpat
43 define Package
/mpd
/Default
/description
44 Music Player Daemon
(MPD
) is a flexible
, powerful
, server-side
45 application for playing music. It is typically controlled over a
46 network using one of it
's many clients including mpc (console),
47 gmpc (gnome), phpmp (php), etc...
50 define Package/mpd-full
51 $(call Package/mpd/Default)
54 +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
55 +libmms +libogg +libsndfile +libvorbis +libupnp
60 define Package/mpd-full/description
61 $(call Package/mpd/Default/description)
63 This package contains a full-blown Music Player Daemon.
66 define Package/mpd-full/conffiles
70 define Package/mpd-mini
71 $(call Package/mpd/Default)
77 define Package/mpd-mini/description
78 $(call Package/mpd/Default/description)
80 This package contains a minimal Music Player Daemon, with support for
81 only Flac, MP3 & OGG media types & only file: & http: protocols.
84 define Package/mpd-mini/conffiles
88 define Package/mpd-avahi-service
89 $(call Package/mpd/Default)
90 TITLE+= (Avahi service)
91 DEPENDS+=+avahi-daemon
94 define Package/mpd-avahi-service/description
95 $(call Package/mpd/Default/description)
97 This package contains the service definition for announcing the
98 Music Player Daemon service via mDNS/DNS-SD.
101 define Package/mpd-avahi-service/conffiles
102 /etc/avahi/services/mpd.service
106 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
108 --disable-documentation \
114 --disable-fluidsynth \
133 --disable-solaris-output \
135 --disable-lame-encoder \
136 --disable-twolame-encoder \
137 --disable-shine-encoder \
138 --enable-wave-encoder \
147 --enable-httpd-output \
148 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
149 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
154 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
155 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
156 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
157 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
159 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
161 ifeq ($(BUILD_VARIANT),full)
165 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
173 --enable-pipe-output \
174 --enable-recorder-output \
178 --disable-vorbis-encoder \
179 --with-faad="$(STAGING_DIR)/usr" \
184 ifeq ($(BUILD_VARIANT),mini)
186 # oggflac is not compatible with tremor
190 --disable-audiofile \
195 --disable-pipe-output \
196 --disable-recorder-output \
200 --disable-vorbis-encoder \
205 define Package/mpd/install
206 $(INSTALL_DIR) $(1)/usr/bin
207 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
208 $(INSTALL_DIR) $(1)/etc
209 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
210 $(INSTALL_DIR) $(1)/etc/init.d
211 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
214 define Package/mpd-full/install
215 $(call Package/mpd/install,$1)
218 define Package/mpd-mini/install
219 $(call Package/mpd/install,$1)
222 define Package/mpd-avahi-service/install
223 $(INSTALL_DIR) $(1)/etc/avahi/services
224 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
227 $(eval $(call BuildPackage,mpd-full))
228 $(eval $(call BuildPackage,mpd-mini))
229 $(eval $(call BuildPackage,mpd-avahi-service))