2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
13 PKG_SOURCE_URL
:=http
://www.musicpd.org
/download
/mpd
/0.20/
14 PKG_HASH
:=7d177f29663c4a0997413401e52bbf11d2bb472773bbcf9294f839c4b8751e35
15 PKG_MAINTAINER
:=Ted Hess
<thess@kitschensync.net
>
18 PKG_LICENSE_FILES
:=COPYING
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 PKG_CONFIG_DEPENDS
:= \
28 include $(INCLUDE_DIR
)/package.mk
29 include $(INCLUDE_DIR
)/nls.mk
31 define Package
/mpd
/Default
34 TITLE
:=Music Player Daemon
35 URL
:=http
://www.musicpd.org
/
36 DEPENDS
:= +glib2
+libcurl
+libpthread
+libmpdclient
+libstdcpp
$(ICONV_DEPENDS
) \
37 +libflac
+BUILD_PATENTED
:libmad
+libvorbisidec
+AUDIO_SUPPORT
:alsa-lib \
38 +boost
+boost-container
+libexpat
41 define Package
/mpd
/Default
/description
42 Music Player Daemon
(MPD
) is a flexible
, powerful
, server-side
43 application for playing music. It is typically controlled over a
44 network using one of it
's many clients including mpc (console),
45 gmpc (gnome), phpmp (php), etc...
48 define Package/mpd-full
49 $(call Package/mpd/Default)
52 +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
53 +libmms +libogg +libsndfile +libvorbis +libupnp
58 define Package/mpd-full/description
59 $(call Package/mpd/Default/description)
61 This package contains a full-blown Music Player Daemon.
64 define Package/mpd-full/conffiles
68 define Package/mpd-mini
69 $(call Package/mpd/Default)
75 define Package/mpd-mini/description
76 $(call Package/mpd/Default/description)
78 This package contains a minimal Music Player Daemon, with support for
79 only Flac, MP3 & OGG media types & only file: & http: protocols.
82 define Package/mpd-mini/conffiles
86 define Package/mpd-avahi-service
87 $(call Package/mpd/Default)
88 TITLE+= (Avahi service)
89 DEPENDS+=+avahi-daemon
92 define Package/mpd-avahi-service/description
93 $(call Package/mpd/Default/description)
95 This package contains the service definition for announcing the
96 Music Player Daemon service via mDNS/DNS-SD.
99 define Package/mpd-avahi-service/conffiles
100 /etc/avahi/services/mpd.service
103 TARGET_CFLAGS += -ggdb3
104 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
105 EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
108 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
110 --disable-documentation \
116 --disable-fluidsynth \
135 --disable-solaris-output \
137 --disable-lame-encoder \
138 --disable-twolame-encoder \
139 --disable-shine-encoder \
140 --enable-wave-encoder \
149 --enable-httpd-output \
150 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
151 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
156 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
157 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
158 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
159 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
161 ifeq ($(BUILD_VARIANT),full)
165 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
172 --enable-pipe-output \
173 --enable-recorder-output \
177 --disable-vorbis-encoder \
182 ifeq ($(BUILD_VARIANT),mini)
184 # oggflac is not compatible with tremor
188 --disable-audiofile \
193 --disable-pipe-output \
194 --disable-recorder-output \
198 --disable-vorbis-encoder \
203 define Package/mpd/install
204 $(INSTALL_DIR) $(1)/usr/bin
205 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
206 $(INSTALL_DIR) $(1)/etc
207 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
208 $(INSTALL_DIR) $(1)/etc/init.d
209 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
212 define Package/mpd-full/install
213 $(call Package/mpd/install,$1)
216 define Package/mpd-mini/install
217 $(call Package/mpd/install,$1)
220 define Package/mpd-avahi-service/install
221 $(INSTALL_DIR) $(1)/etc/avahi/services
222 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
225 $(eval $(call BuildPackage,mpd-full))
226 $(eval $(call BuildPackage,mpd-mini))
227 $(eval $(call BuildPackage,mpd-avahi-service))