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
:= \
29 include $(INCLUDE_DIR
)/package.mk
30 include $(INCLUDE_DIR
)/nls.mk
32 define Package
/mpd
/Default
35 TITLE
:=Music Player Daemon
36 URL
:=http
://www.musicpd.org
/
37 DEPENDS
:= +glib2
+libcurl
+libpthread
+libmpdclient
+libstdcpp
$(ICONV_DEPENDS
) \
38 +libflac
+BUILD_PATENTED
:libmad
+libvorbisidec
+AUDIO_SUPPORT
:alsa-lib \
39 +boost
+boost-container
+libexpat
42 define Package
/mpd
/Default
/description
43 Music Player Daemon
(MPD
) is a flexible
, powerful
, server-side
44 application for playing music. It is typically controlled over a
45 network using one of it
's many clients including mpc (console),
46 gmpc (gnome), phpmp (php), etc...
49 define Package/mpd-full
50 $(call Package/mpd/Default)
53 +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
54 +libmms +libogg +libsndfile +libvorbis +libupnp
59 define Package/mpd-full/description
60 $(call Package/mpd/Default/description)
62 This package contains a full-blown Music Player Daemon.
65 define Package/mpd-full/conffiles
69 define Package/mpd-mini
70 $(call Package/mpd/Default)
76 define Package/mpd-mini/description
77 $(call Package/mpd/Default/description)
79 This package contains a minimal Music Player Daemon, with support for
80 only Flac, MP3 & OGG media types & only file: & http: protocols.
83 define Package/mpd-mini/conffiles
87 define Package/mpd-avahi-service
88 $(call Package/mpd/Default)
89 TITLE+= (Avahi service)
90 DEPENDS+=+avahi-daemon
93 define Package/mpd-avahi-service/description
94 $(call Package/mpd/Default/description)
96 This package contains the service definition for announcing the
97 Music Player Daemon service via mDNS/DNS-SD.
100 define Package/mpd-avahi-service/conffiles
101 /etc/avahi/services/mpd.service
104 TARGET_CFLAGS += -ggdb3
105 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
106 EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
109 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
111 --disable-documentation \
117 --disable-fluidsynth \
136 --disable-solaris-output \
138 --disable-lame-encoder \
139 --disable-twolame-encoder \
140 --disable-shine-encoder \
141 --enable-wave-encoder \
150 --enable-httpd-output \
151 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
152 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
157 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
158 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
159 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
160 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
162 ifeq ($(BUILD_VARIANT),full)
166 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
173 --enable-pipe-output \
174 --enable-recorder-output \
178 --disable-vorbis-encoder \
183 ifeq ($(BUILD_VARIANT),mini)
185 # oggflac is not compatible with tremor
189 --disable-audiofile \
194 --disable-pipe-output \
195 --disable-recorder-output \
199 --disable-vorbis-encoder \
204 define Package/mpd/install
205 $(INSTALL_DIR) $(1)/usr/bin
206 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
207 $(INSTALL_DIR) $(1)/etc
208 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
209 $(INSTALL_DIR) $(1)/etc/init.d
210 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
213 define Package/mpd-full/install
214 $(call Package/mpd/install,$1)
217 define Package/mpd-mini/install
218 $(call Package/mpd/install,$1)
221 define Package/mpd-avahi-service/install
222 $(INSTALL_DIR) $(1)/etc/avahi/services
223 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
226 $(eval $(call BuildPackage,mpd-full))
227 $(eval $(call BuildPackage,mpd-mini))
228 $(eval $(call BuildPackage,mpd-avahi-service))