xref: /OK3568_Linux_fs/buildroot/package/mpd/mpd.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# mpd
4#
5################################################################################
6
7MPD_VERSION_MAJOR = 0.22
8MPD_VERSION = $(MPD_VERSION_MAJOR).11
9MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
10MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR)
11MPD_DEPENDENCIES = host-pkgconf boost
12MPD_LICENSE = GPL-2.0+
13MPD_LICENSE_FILES = COPYING
14MPD_SELINUX_MODULES = mpd
15MPD_CONF_OPTS = \
16	-Daudiofile=disabled \
17	-Ddocumentation=disabled
18
19# Zeroconf support depends on libdns_sd from avahi.
20ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y)
21MPD_DEPENDENCIES += avahi
22MPD_CONF_OPTS += -Dzeroconf=avahi
23else
24MPD_CONF_OPTS += -Dzeroconf=disabled
25endif
26
27# MPD prefers libicu for utf8 collation instead of libglib2.
28ifeq ($(BR2_PACKAGE_ICU),y)
29MPD_DEPENDENCIES += icu
30MPD_CONF_OPTS += -Dicu=enabled
31else
32MPD_CONF_OPTS += -Dicu=disabled
33endif
34
35ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
36MPD_DEPENDENCIES += alsa-lib
37MPD_CONF_OPTS += -Dalsa=enabled
38else
39MPD_CONF_OPTS += -Dalsa=disabled
40endif
41
42ifeq ($(BR2_PACKAGE_MPD_AO),y)
43MPD_DEPENDENCIES += libao
44MPD_CONF_OPTS += -Dao=enabled
45else
46MPD_CONF_OPTS += -Dao=disabled
47endif
48
49ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
50MPD_DEPENDENCIES += bzip2
51MPD_CONF_OPTS += -Dbzip2=enabled
52else
53MPD_CONF_OPTS += -Dbzip2=disabled
54endif
55
56ifeq ($(BR2_PACKAGE_MPD_CDIO_PARANOIA),y)
57MPD_DEPENDENCIES += libcdio-paranoia
58MPD_CONF_OPTS += -Dcdio_paranoia=enabled
59else
60MPD_CONF_OPTS += -Dcdio_paranoia=disabled
61endif
62
63ifeq ($(BR2_PACKAGE_MPD_CURL),y)
64MPD_DEPENDENCIES += libcurl
65MPD_CONF_OPTS += -Dcurl=enabled
66else
67MPD_CONF_OPTS += -Dcurl=disabled
68endif
69
70ifeq ($(BR2_PACKAGE_MPD_DSD),y)
71MPD_CONF_OPTS += -Ddsd=true
72else
73MPD_CONF_OPTS += -Ddsd=false
74endif
75
76ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
77MPD_DEPENDENCIES += faad2
78MPD_CONF_OPTS += -Dfaad=enabled
79else
80MPD_CONF_OPTS += -Dfaad=disabled
81endif
82
83ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
84MPD_DEPENDENCIES += ffmpeg
85MPD_CONF_OPTS += -Dffmpeg=enabled
86else
87MPD_CONF_OPTS += -Dffmpeg=disabled
88endif
89
90ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
91MPD_DEPENDENCIES += flac
92MPD_CONF_OPTS += -Dflac=enabled
93else
94MPD_CONF_OPTS += -Dflac=disabled
95endif
96
97ifeq ($(BR2_PACKAGE_MPD_FLUIDSYNTH),y)
98MPD_DEPENDENCIES += fluidsynth
99MPD_CONF_OPTS += -Dfluidsynth=enabled
100else
101MPD_CONF_OPTS += -Dfluidsynth=disabled
102endif
103
104ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y)
105MPD_CONF_OPTS += -Dhttpd=true
106else
107MPD_CONF_OPTS += -Dhttpd=false
108endif
109
110ifeq ($(BR2_PACKAGE_MPD_ID3TAG),y)
111MPD_DEPENDENCIES += libid3tag
112MPD_CONF_OPTS += -Did3tag=enabled
113else
114MPD_CONF_OPTS += -Did3tag=disabled
115endif
116
117ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
118MPD_DEPENDENCIES += jack2
119MPD_CONF_OPTS += -Djack=enabled
120else
121MPD_CONF_OPTS += -Djack=disabled
122endif
123
124ifeq ($(BR2_PACKAGE_MPD_LAME),y)
125MPD_DEPENDENCIES += lame
126MPD_CONF_OPTS += -Dlame=enabled
127else
128MPD_CONF_OPTS += -Dlame=disabled
129endif
130
131ifeq ($(BR2_PACKAGE_MPD_LIBMPDCLIENT),y)
132MPD_DEPENDENCIES += libmpdclient
133MPD_CONF_OPTS += -Dlibmpdclient=enabled
134else
135MPD_CONF_OPTS += -Dlibmpdclient=disabled
136endif
137
138ifeq ($(BR2_PACKAGE_MPD_LIBMMS),y)
139MPD_DEPENDENCIES += libmms
140MPD_CONF_OPTS += -Dmms=enabled
141else
142MPD_CONF_OPTS += -Dmms=disabled
143endif
144
145ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y)
146MPD_DEPENDENCIES += libnfs
147MPD_CONF_OPTS += -Dnfs=enabled
148else
149MPD_CONF_OPTS += -Dnfs=disabled
150endif
151
152ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y)
153MPD_DEPENDENCIES += samba4
154MPD_CONF_OPTS += -Dsmbclient=enabled
155else
156MPD_CONF_OPTS += -Dsmbclient=disabled
157endif
158
159ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
160MPD_DEPENDENCIES += libsamplerate
161MPD_CONF_OPTS += -Dlibsamplerate=enabled
162else
163MPD_CONF_OPTS += -Dlibsamplerate=disabled
164endif
165
166ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
167MPD_DEPENDENCIES += libsndfile
168MPD_CONF_OPTS += -Dsndfile=enabled
169else
170MPD_CONF_OPTS += -Dsndfile=disabled
171endif
172
173ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y)
174MPD_DEPENDENCIES += libsoxr
175MPD_CONF_OPTS += -Dsoxr=enabled
176else
177MPD_CONF_OPTS += -Dsoxr=disabled
178endif
179
180ifeq ($(BR2_PACKAGE_MPD_MAD),y)
181MPD_DEPENDENCIES += libid3tag libmad
182MPD_CONF_OPTS += -Dmad=enabled
183else
184MPD_CONF_OPTS += -Dmad=disabled
185endif
186
187ifeq ($(BR2_PACKAGE_MPD_MODPLUG),y)
188MPD_DEPENDENCIES += libmodplug
189MPD_CONF_OPTS += -Dmodplug=enabled
190else
191MPD_CONF_OPTS += -Dmodplug=disabled
192endif
193
194ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
195MPD_DEPENDENCIES += libid3tag mpg123
196MPD_CONF_OPTS += -Dmpg123=enabled
197else
198MPD_CONF_OPTS += -Dmpg123=disabled
199endif
200
201ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
202MPD_DEPENDENCIES += musepack
203MPD_CONF_OPTS += -Dmpcdec=enabled
204else
205MPD_CONF_OPTS += -Dmpcdec=disabled
206endif
207
208ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y)
209MPD_CONF_OPTS += -Dneighbor=true
210else
211MPD_CONF_OPTS += -Dneighbor=false
212endif
213
214ifeq ($(BR2_PACKAGE_MPD_OPENAL),y)
215MPD_DEPENDENCIES += openal
216MPD_CONF_OPTS += -Dopenal=enabled
217else
218MPD_CONF_OPTS += -Dopenal=disabled
219endif
220
221ifeq ($(BR2_PACKAGE_MPD_OPUS),y)
222MPD_DEPENDENCIES += opus libogg
223MPD_CONF_OPTS += -Dopus=enabled
224else
225MPD_CONF_OPTS += -Dopus=disabled
226endif
227
228ifeq ($(BR2_PACKAGE_MPD_OSS),y)
229MPD_CONF_OPTS += -Doss=enabled
230else
231MPD_CONF_OPTS += -Doss=disabled
232endif
233
234ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
235MPD_DEPENDENCIES += pulseaudio
236MPD_CONF_OPTS += -Dpulse=enabled
237else
238MPD_CONF_OPTS += -Dpulse=disabled
239endif
240
241ifeq ($(BR2_PACKAGE_MPD_QOBUZ),y)
242MPD_DEPENDENCIES += libgcrypt yajl
243MPD_CONF_OPTS += -Dqobuz=enabled
244else
245MPD_CONF_OPTS += -Dqobuz=disabled
246endif
247
248ifeq ($(BR2_PACKAGE_MPD_SHOUTCAST),y)
249MPD_DEPENDENCIES += libshout
250MPD_CONF_OPTS += -Dshout=enabled
251else
252MPD_CONF_OPTS += -Dshout=disabled
253endif
254
255ifeq ($(BR2_PACKAGE_MPD_SIDPLAY),y)
256MPD_DEPENDENCIES += libsidplay2
257MPD_CONF_OPTS += -Dsidplay=enabled
258else
259MPD_CONF_OPTS += -Dsidplay=disabled
260endif
261
262ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
263MPD_DEPENDENCIES += yajl
264MPD_CONF_OPTS += -Dsoundcloud=enabled
265else
266MPD_CONF_OPTS += -Dsoundcloud=disabled
267endif
268
269ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
270MPD_DEPENDENCIES += sqlite
271MPD_CONF_OPTS += -Dsqlite=enabled
272else
273MPD_CONF_OPTS += -Dsqlite=disabled
274endif
275
276ifneq ($(BR2_PACKAGE_MPD_TCP),y)
277MPD_CONF_OPTS += -Dtcp=true
278endif
279
280ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
281MPD_DEPENDENCIES += tremor
282MPD_CONF_OPTS += -Dtremor=enabled
283else
284MPD_CONF_OPTS += -Dtremor=disabled
285endif
286
287ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y)
288MPD_DEPENDENCIES += twolame
289MPD_CONF_OPTS += -Dtwolame=enabled
290else
291MPD_CONF_OPTS += -Dtwolame=disabled
292endif
293
294ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
295MPD_DEPENDENCIES += \
296	expat \
297	libupnp
298MPD_CONF_OPTS += -Dupnp=enabled
299else
300MPD_CONF_OPTS += -Dupnp=disabled
301endif
302
303ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
304MPD_DEPENDENCIES += libvorbis
305MPD_CONF_OPTS += -Dvorbis=enabled -Dvorbisenc=enabled
306else
307MPD_CONF_OPTS += -Dvorbis=disabled -Dvorbisenc=disabled
308endif
309
310ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
311MPD_DEPENDENCIES += wavpack
312MPD_CONF_OPTS += -Dwavpack=enabled
313else
314MPD_CONF_OPTS += -Dwavpack=disabled
315endif
316
317ifeq ($(BR2_PACKAGE_MPD_ZZIP),y)
318MPD_DEPENDENCIES += zziplib
319MPD_CONF_OPTS += -Dzzip=enabled
320else
321MPD_CONF_OPTS += -Dzzip=disabled
322endif
323
324define MPD_INSTALL_EXTRA_FILES
325	$(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
326	mkdir -p $(TARGET_DIR)/var/lib/mpd/music
327	mkdir -p $(TARGET_DIR)/var/lib/mpd/playlists
328endef
329
330MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
331
332define MPD_INSTALL_INIT_SYSV
333	$(INSTALL) -m 0755 -D package/mpd/S95mpd \
334		$(TARGET_DIR)/etc/init.d/S95mpd
335endef
336
337$(eval $(meson-package))
338