b5adafd270f423d0cbb00799c368bdbfbf4cd90c
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / mpd / mpd.mk
1 ################################################################################
2 #
3 # mpd
4 #
5 ################################################################################
6
7 MPD_VERSION_MAJOR = 0.19
8 MPD_VERSION = $(MPD_VERSION_MAJOR).9
9 MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
10 MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR)
11 MPD_DEPENDENCIES = host-pkgconf boost libglib2
12 MPD_LICENSE = GPLv2+
13 MPD_LICENSE_FILES = COPYING
14
15 # Some options need an explicit --disable or --enable
16
17 # Zeroconf support depends on libdns_sd from avahi.
18 ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y)
19 MPD_DEPENDENCIES += avahi
20 MPD_CONF_OPTS += --with-zeroconf=avahi
21 else
22 MPD_CONF_OPTS += --with-zeroconf=no
23 endif
24
25 # MPD prefers libicu for utf8 collation instead of libglib2.
26 ifeq ($(BR2_PACKAGE_ICU),y)
27 MPD_DEPENDENCIES += icu
28 MPD_CONF_OPTS += --enable-icu
29 else
30 MPD_CONF_OPTS += --disable-icu
31 endif
32
33 ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
34 MPD_DEPENDENCIES += alsa-lib
35 MPD_CONF_OPTS += --enable-alsa
36 else
37 MPD_CONF_OPTS += --disable-alsa
38 endif
39
40 ifeq ($(BR2_PACKAGE_MPD_AO),y)
41 MPD_DEPENDENCIES += libao
42 MPD_CONF_OPTS += --enable-ao
43 else
44 MPD_CONF_OPTS += --disable-ao
45 endif
46
47 ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y)
48 MPD_DEPENDENCIES += audiofile
49 MPD_CONF_OPTS += --enable-audiofile
50 else
51 MPD_CONF_OPTS += --disable-audiofile
52 endif
53
54 ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
55 MPD_DEPENDENCIES += bzip2
56 MPD_CONF_OPTS += --enable-bzip2
57 else
58 MPD_CONF_OPTS += --disable-bzip2
59 endif
60
61 ifeq ($(BR2_PACKAGE_MPD_CURL),y)
62 MPD_DEPENDENCIES += libcurl
63 MPD_CONF_OPTS += --enable-curl
64 else
65 MPD_CONF_OPTS += --disable-curl
66 endif
67
68 ifeq ($(BR2_PACKAGE_MPD_DSD),y)
69 MPD_CONF_OPTS += --enable-dsd
70 else
71 MPD_CONF_OPTS += --disable-dsd
72 endif
73
74 ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
75 MPD_DEPENDENCIES += faad2
76 MPD_CONF_OPTS += --enable-aac
77 else
78 MPD_CONF_OPTS += --disable-aac
79 endif
80
81 ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
82 MPD_DEPENDENCIES += ffmpeg
83 MPD_CONF_OPTS += --enable-ffmpeg
84 else
85 MPD_CONF_OPTS += --disable-ffmpeg
86 endif
87
88 ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
89 MPD_DEPENDENCIES += flac
90 MPD_CONF_OPTS += --enable-flac
91 else
92 MPD_CONF_OPTS += --disable-flac
93 endif
94
95 ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
96 MPD_DEPENDENCIES += jack2
97 MPD_CONF_OPTS += --enable-jack
98 else
99 MPD_CONF_OPTS += --disable-jack
100 endif
101
102 ifeq ($(BR2_PACKAGE_MPD_LAME),y)
103 MPD_DEPENDENCIES += lame
104 MPD_CONF_OPTS += --enable-lame-encoder
105 else
106 MPD_CONF_OPTS += --disable-lame-encoder
107 endif
108
109 ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y)
110 MPD_DEPENDENCIES += libnfs
111 MPD_CONF_OPTS += --enable-nfs
112 else
113 MPD_CONF_OPTS += --disable-nfs
114 endif
115
116 ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y)
117 MPD_DEPENDENCIES += samba4
118 MPD_CONF_OPTS += --enable-smbclient
119 else
120 MPD_CONF_OPTS += --disable-smbclient
121 endif
122
123 ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
124 MPD_DEPENDENCIES += libsamplerate
125 MPD_CONF_OPTS += --enable-lsr
126 else
127 MPD_CONF_OPTS += --disable-lsr
128 endif
129
130 ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
131 MPD_DEPENDENCIES += libsndfile
132 MPD_CONF_OPTS += --enable-sndfile
133 else
134 MPD_CONF_OPTS += --disable-sndfile
135 endif
136
137 ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y)
138 MPD_DEPENDENCIES += libsoxr
139 MPD_CONF_OPTS += --enable-soxr
140 else
141 MPD_CONF_OPTS += --disable-soxr
142 endif
143
144 ifeq ($(BR2_PACKAGE_MPD_MAD),y)
145 MPD_DEPENDENCIES += libid3tag libmad
146 MPD_CONF_OPTS += --enable-mad
147 else
148 MPD_CONF_OPTS += --disable-mad
149 endif
150
151 ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
152 MPD_DEPENDENCIES += libid3tag mpg123
153 MPD_CONF_OPTS += --enable-mpg123
154 else
155 MPD_CONF_OPTS += --disable-mpg123
156 endif
157
158 ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
159 MPD_DEPENDENCIES += musepack
160 MPD_CONF_OPTS += --enable-mpc
161 else
162 MPD_CONF_OPTS += --disable-mpc
163 endif
164
165 ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y)
166 MPD_CONF_OPTS += --enable-neighbor-plugins
167 else
168 MPD_CONF_OPTS += --disable-neighbor-plugins
169 endif
170
171 ifeq ($(BR2_PACKAGE_MPD_OPUS),y)
172 MPD_DEPENDENCIES += opus libogg
173 MPD_CONF_OPTS += --enable-opus
174 else
175 MPD_CONF_OPTS += --disable-opus
176 endif
177
178 ifeq ($(BR2_PACKAGE_MPD_OSS),y)
179 MPD_CONF_OPTS += --enable-oss
180 else
181 MPD_CONF_OPTS += --disable-oss
182 endif
183
184 ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
185 MPD_DEPENDENCIES += pulseaudio
186 MPD_CONF_OPTS += --enable-pulse
187 else
188 MPD_CONF_OPTS += --disable-pulse
189 endif
190
191 ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
192 MPD_DEPENDENCIES += yajl
193 MPD_CONF_OPTS += --enable-soundcloud
194 else
195 MPD_CONF_OPTS += --disable-soundcloud
196 endif
197
198 ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
199 MPD_DEPENDENCIES += sqlite
200 MPD_CONF_OPTS += --enable-sqlite
201 else
202 MPD_CONF_OPTS += --disable-sqlite
203 endif
204
205 ifneq ($(BR2_PACKAGE_MPD_TCP),y)
206 MPD_CONF_OPTS += --disable-tcp
207 endif
208
209 ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
210 MPD_DEPENDENCIES += tremor
211 MPD_CONF_OPTS += --with-tremor
212 endif
213
214 ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y)
215 MPD_DEPENDENCIES += twolame
216 MPD_CONF_OPTS += --enable-twolame-encoder
217 else
218 MPD_CONF_OPTS += --disable-twolame-encoder
219 endif
220
221 ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
222 MPD_DEPENDENCIES += expat libupnp
223 MPD_CONF_OPTS += --enable-upnp
224 else
225 MPD_CONF_OPTS += --disable-upnp
226 endif
227
228 ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
229 MPD_DEPENDENCIES += libvorbis
230 MPD_CONF_OPTS += --enable-vorbis --enable-vorbis-encoder
231 else
232 MPD_CONF_OPTS += --disable-vorbis --disable-vorbis-encoder
233 endif
234
235 ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
236 MPD_DEPENDENCIES += wavpack
237 MPD_CONF_OPTS += --enable-wavpack
238 else
239 MPD_CONF_OPTS += --disable-wavpack
240 endif
241
242 define MPD_INSTALL_EXTRA_FILES
243         $(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
244 endef
245
246 MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
247
248 define MPD_INSTALL_INIT_SYSV
249         $(INSTALL) -m 0755 -D package/mpd/S95mpd \
250                 $(TARGET_DIR)/etc/init.d/S95mpd
251 endef
252
253 $(eval $(autotools-package))