mpd: Upgrade Music Player Daemon to 0.20.8
[feed/packages.git] / sound / mpd / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=mpd
9 PKG_VERSION:=0.20.8
10 PKG_RELEASE:=1
11
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>
16
17 PKG_LICENSE:=GPL-2.0
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_BUILD_PARALLEL:=1
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_IPV6 \
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
30
31 define Package/mpd/Default
32 SECTION:=sound
33 CATEGORY:=Sound
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
39 endef
40
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...
46 endef
47
48 define Package/mpd-full
49 $(call Package/mpd/Default)
50 TITLE+= (full)
51 DEPENDS+= \
52 +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
53 +libmms +libogg +libsndfile +libvorbis +libupnp
54 PROVIDES:=mpd
55 VARIANT:=full
56 endef
57
58 define Package/mpd-full/description
59 $(call Package/mpd/Default/description)
60 .
61 This package contains a full-blown Music Player Daemon.
62 endef
63
64 define Package/mpd-full/conffiles
65 /etc/mpd.conf
66 endef
67
68 define Package/mpd-mini
69 $(call Package/mpd/Default)
70 TITLE+= (mini)
71 PROVIDES:=mpd
72 VARIANT:=mini
73 endef
74
75 define Package/mpd-mini/description
76 $(call Package/mpd/Default/description)
77 .
78 This package contains a minimal Music Player Daemon, with support for
79 only Flac, MP3 & OGG media types & only file: & http: protocols.
80 endef
81
82 define Package/mpd-mini/conffiles
83 /etc/mpd.conf
84 endef
85
86 define Package/mpd-avahi-service
87 $(call Package/mpd/Default)
88 TITLE+= (Avahi service)
89 DEPENDS+=+avahi-daemon
90 endef
91
92 define Package/mpd-avahi-service/description
93 $(call Package/mpd/Default/description)
94 .
95 This package contains the service definition for announcing the
96 Music Player Daemon service via mDNS/DNS-SD.
97 endef
98
99 define Package/mpd-avahi-service/conffiles
100 /etc/avahi/services/mpd.service
101 endef
102
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)
106
107 CONFIGURE_ARGS += \
108 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
109 --disable-debug \
110 --disable-documentation \
111 --disable-test \
112 --disable-werror \
113 \
114 --disable-ao \
115 --disable-bzip2 \
116 --disable-fluidsynth \
117 --disable-wildmidi \
118 --disable-gme \
119 --enable-inotify \
120 --disable-icu \
121 --disable-eventfd \
122 --disable-iso9660 \
123 --disable-jack \
124 --disable-roar \
125 --disable-libwrap \
126 --disable-lsr \
127 --disable-mikmod \
128 --disable-modplug \
129 --disable-mpc \
130 --disable-mpg123 \
131 --disable-openal \
132 --disable-opus \
133 --disable-pulse \
134 --disable-sidplay \
135 --disable-solaris-output \
136 --disable-sqlite \
137 --disable-lame-encoder \
138 --disable-twolame-encoder \
139 --disable-shine-encoder \
140 --enable-wave-encoder \
141 --disable-wavpack \
142 --disable-wildmidi \
143 --disable-zzip \
144 --with-zeroconf=no \
145 --disable-soxr \
146 \
147 --enable-curl \
148 --enable-flac \
149 --enable-httpd-output \
150 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
151 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
152 --enable-tcp \
153 --enable-un \
154
155 CONFIGURE_VARS += \
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") \
160
161 ifeq ($(BUILD_VARIANT),full)
162
163 CONFIGURE_ARGS += \
164 --enable-upnp \
165 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
166 --enable-audiofile \
167 --enable-fifo \
168 --enable-ffmpeg \
169 --enable-id3 \
170 --enable-mms \
171 --enable-flac \
172 --enable-pipe-output \
173 --enable-recorder-output \
174 --disable-shout \
175 --enable-sndfile \
176 --enable-vorbis \
177 --disable-vorbis-encoder \
178 --with-tremor=yes \
179
180 endif
181
182 ifeq ($(BUILD_VARIANT),mini)
183
184 # oggflac is not compatible with tremor
185 CONFIGURE_ARGS += \
186 --disable-upnp \
187 --disable-aac \
188 --disable-audiofile \
189 --disable-fifo \
190 --disable-ffmpeg \
191 --disable-id3 \
192 --disable-mms \
193 --disable-pipe-output \
194 --disable-recorder-output \
195 --disable-shout \
196 --disable-sndfile \
197 --disable-vorbis \
198 --disable-vorbis-encoder \
199 --with-tremor=yes \
200
201 endif
202
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
210 endef
211
212 define Package/mpd-full/install
213 $(call Package/mpd/install,$1)
214 endef
215
216 define Package/mpd-mini/install
217 $(call Package/mpd/install,$1)
218 endef
219
220 define Package/mpd-avahi-service/install
221 $(INSTALL_DIR) $(1)/etc/avahi/services
222 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
223 endef
224
225 $(eval $(call BuildPackage,mpd-full))
226 $(eval $(call BuildPackage,mpd-mini))
227 $(eval $(call BuildPackage,mpd-avahi-service))