python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / mpd / mpd.mk
blob79cc995c88b87d942b48c78bbf36372fd7e6fe94
1 ################################################################################
3 # mpd
5 ################################################################################
7 MPD_VERSION_MAJOR = $(call qstrip,$(BR2_PACKAGE_MPD_VERSION_STRING))
8 ifeq ($(BR2_PACKAGE_MPD_VERSION_0_20),y)
9 MPD_VERSION = $(MPD_VERSION_MAJOR).6
10 else
11 MPD_VERSION = $(MPD_VERSION_MAJOR).21
12 endif
13 MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
14 MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR)
15 MPD_DEPENDENCIES = host-pkgconf boost
16 MPD_LICENSE = GPLv2+
17 MPD_LICENSE_FILES = COPYING
18 MPD_AUTORECONF = YES
20 ifeq ($(BR2_PACKAGE_MPD_VERSION_0_19),y)
21 MPD_DEPENDENCIES += libglib2
22 endif
24 # Some options need an explicit --disable or --enable
26 # Zeroconf support depends on libdns_sd from avahi.
27 ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y)
28 MPD_DEPENDENCIES += avahi
29 MPD_CONF_OPTS += --with-zeroconf=avahi
30 else
31 MPD_CONF_OPTS += --with-zeroconf=no
32 endif
34 # MPD prefers libicu for utf8 collation instead of libglib2.
35 ifeq ($(BR2_PACKAGE_ICU),y)
36 MPD_DEPENDENCIES += icu
37 MPD_CONF_OPTS += --enable-icu
38 else
39 MPD_CONF_OPTS += --disable-icu
40 endif
42 ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
43 MPD_DEPENDENCIES += alsa-lib
44 MPD_CONF_OPTS += --enable-alsa
45 else
46 MPD_CONF_OPTS += --disable-alsa
47 endif
49 ifeq ($(BR2_PACKAGE_MPD_AO),y)
50 MPD_DEPENDENCIES += libao
51 MPD_CONF_OPTS += --enable-ao
52 else
53 MPD_CONF_OPTS += --disable-ao
54 endif
56 ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y)
57 MPD_DEPENDENCIES += audiofile
58 MPD_CONF_OPTS += --enable-audiofile
59 else
60 MPD_CONF_OPTS += --disable-audiofile
61 endif
63 ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
64 MPD_DEPENDENCIES += bzip2
65 MPD_CONF_OPTS += --enable-bzip2
66 else
67 MPD_CONF_OPTS += --disable-bzip2
68 endif
70 ifeq ($(BR2_PACKAGE_MPD_CURL),y)
71 MPD_DEPENDENCIES += libcurl
72 MPD_CONF_OPTS += --enable-curl
73 else
74 MPD_CONF_OPTS += --disable-curl
75 endif
77 ifeq ($(BR2_PACKAGE_MPD_DSD),y)
78 MPD_CONF_OPTS += --enable-dsd
79 else
80 MPD_CONF_OPTS += --disable-dsd
81 endif
83 ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
84 MPD_DEPENDENCIES += faad2
85 MPD_CONF_OPTS += --enable-aac
86 else
87 MPD_CONF_OPTS += --disable-aac
88 endif
90 ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
91 MPD_DEPENDENCIES += ffmpeg
92 MPD_CONF_OPTS += --enable-ffmpeg
93 else
94 MPD_CONF_OPTS += --disable-ffmpeg
95 endif
97 ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
98 MPD_DEPENDENCIES += flac
99 MPD_CONF_OPTS += --enable-flac
100 else
101 MPD_CONF_OPTS += --disable-flac
102 endif
104 ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y)
105 MPD_CONF_OPTS += --enable-httpd-output
106 else
107 MPD_CONF_OPTS += --disable-httpd-output
108 endif
110 ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
111 MPD_DEPENDENCIES += jack2
112 MPD_CONF_OPTS += --enable-jack
113 else
114 MPD_CONF_OPTS += --disable-jack
115 endif
117 ifeq ($(BR2_PACKAGE_MPD_LAME),y)
118 MPD_DEPENDENCIES += lame
119 MPD_CONF_OPTS += --enable-lame-encoder
120 else
121 MPD_CONF_OPTS += --disable-lame-encoder
122 endif
124 ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y)
125 MPD_DEPENDENCIES += libnfs
126 MPD_CONF_OPTS += --enable-nfs
127 else
128 MPD_CONF_OPTS += --disable-nfs
129 endif
131 ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y)
132 MPD_DEPENDENCIES += samba4
133 MPD_CONF_OPTS += --enable-smbclient
134 else
135 MPD_CONF_OPTS += --disable-smbclient
136 endif
138 ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
139 MPD_DEPENDENCIES += libsamplerate
140 MPD_CONF_OPTS += --enable-lsr
141 else
142 MPD_CONF_OPTS += --disable-lsr
143 endif
145 ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
146 MPD_DEPENDENCIES += libsndfile
147 MPD_CONF_OPTS += --enable-sndfile
148 else
149 MPD_CONF_OPTS += --disable-sndfile
150 endif
152 ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y)
153 MPD_DEPENDENCIES += libsoxr
154 MPD_CONF_OPTS += --enable-soxr
155 else
156 MPD_CONF_OPTS += --disable-soxr
157 endif
159 ifeq ($(BR2_PACKAGE_MPD_MAD),y)
160 MPD_DEPENDENCIES += libid3tag libmad
161 MPD_CONF_OPTS += --enable-mad
162 else
163 MPD_CONF_OPTS += --disable-mad
164 endif
166 ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
167 MPD_DEPENDENCIES += libid3tag mpg123
168 MPD_CONF_OPTS += --enable-mpg123
169 else
170 MPD_CONF_OPTS += --disable-mpg123
171 endif
173 ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
174 MPD_DEPENDENCIES += musepack
175 MPD_CONF_OPTS += --enable-mpc
176 else
177 MPD_CONF_OPTS += --disable-mpc
178 endif
180 ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y)
181 MPD_CONF_OPTS += --enable-neighbor-plugins
182 else
183 MPD_CONF_OPTS += --disable-neighbor-plugins
184 endif
186 ifeq ($(BR2_PACKAGE_MPD_OPUS),y)
187 MPD_DEPENDENCIES += opus libogg
188 MPD_CONF_OPTS += --enable-opus
189 else
190 MPD_CONF_OPTS += --disable-opus
191 endif
193 ifeq ($(BR2_PACKAGE_MPD_OSS),y)
194 MPD_CONF_OPTS += --enable-oss
195 else
196 MPD_CONF_OPTS += --disable-oss
197 endif
199 ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
200 MPD_DEPENDENCIES += pulseaudio
201 MPD_CONF_OPTS += --enable-pulse
202 else
203 MPD_CONF_OPTS += --disable-pulse
204 endif
206 ifeq ($(BR2_PACKAGE_MPD_SHOUTCAST),y)
207 MPD_DEPENDENCIES += libshout
208 MPD_CONF_OPTS += --enable-shout
209 else
210 MPD_CONF_OPTS += --disable-shout
211 endif
213 ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
214 MPD_DEPENDENCIES += yajl
215 MPD_CONF_OPTS += --enable-soundcloud
216 else
217 MPD_CONF_OPTS += --disable-soundcloud
218 endif
220 ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
221 MPD_DEPENDENCIES += sqlite
222 MPD_CONF_OPTS += --enable-sqlite
223 else
224 MPD_CONF_OPTS += --disable-sqlite
225 endif
227 ifneq ($(BR2_PACKAGE_MPD_TCP),y)
228 MPD_CONF_OPTS += --disable-tcp
229 endif
231 ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
232 MPD_DEPENDENCIES += tremor
233 # Help mpd to find tremor in static linking scenarios
234 MPD_CONF_ENV += \
235 TREMOR_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`"
236 MPD_CONF_OPTS += --with-tremor=$(STAGING_DIR)/usr
237 endif
239 ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y)
240 MPD_DEPENDENCIES += twolame
241 MPD_CONF_OPTS += --enable-twolame-encoder
242 else
243 MPD_CONF_OPTS += --disable-twolame-encoder
244 endif
246 ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
247 MPD_DEPENDENCIES += expat libupnp
248 MPD_CONF_OPTS += --enable-upnp
249 else
250 MPD_CONF_OPTS += --disable-upnp
251 endif
253 ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
254 MPD_DEPENDENCIES += libvorbis
255 MPD_CONF_OPTS += --enable-vorbis --enable-vorbis-encoder
256 else
257 MPD_CONF_OPTS += --disable-vorbis --disable-vorbis-encoder
258 endif
260 ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
261 MPD_DEPENDENCIES += wavpack
262 MPD_CONF_OPTS += --enable-wavpack
263 else
264 MPD_CONF_OPTS += --disable-wavpack
265 endif
267 define MPD_INSTALL_EXTRA_FILES
268 $(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
269 endef
271 MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
273 define MPD_INSTALL_INIT_SYSV
274 $(INSTALL) -m 0755 -D package/mpd/S95mpd \
275 $(TARGET_DIR)/etc/init.d/S95mpd
276 endef
278 $(eval $(autotools-package))