1 ################################################################################
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
11 MPD_VERSION
= $(MPD_VERSION_MAJOR
).21
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
17 MPD_LICENSE_FILES
= COPYING
20 ifeq ($(BR2_PACKAGE_MPD_VERSION_0_19
),y
)
21 MPD_DEPENDENCIES
+= libglib2
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
31 MPD_CONF_OPTS
+= --with-zeroconf
=no
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
39 MPD_CONF_OPTS
+= --disable-icu
42 ifeq ($(BR2_PACKAGE_MPD_ALSA
),y
)
43 MPD_DEPENDENCIES
+= alsa-lib
44 MPD_CONF_OPTS
+= --enable-alsa
46 MPD_CONF_OPTS
+= --disable-alsa
49 ifeq ($(BR2_PACKAGE_MPD_AO
),y
)
50 MPD_DEPENDENCIES
+= libao
51 MPD_CONF_OPTS
+= --enable-ao
53 MPD_CONF_OPTS
+= --disable-ao
56 ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE
),y
)
57 MPD_DEPENDENCIES
+= audiofile
58 MPD_CONF_OPTS
+= --enable-audiofile
60 MPD_CONF_OPTS
+= --disable-audiofile
63 ifeq ($(BR2_PACKAGE_MPD_BZIP2
),y
)
64 MPD_DEPENDENCIES
+= bzip2
65 MPD_CONF_OPTS
+= --enable-bzip2
67 MPD_CONF_OPTS
+= --disable-bzip2
70 ifeq ($(BR2_PACKAGE_MPD_CURL
),y
)
71 MPD_DEPENDENCIES
+= libcurl
72 MPD_CONF_OPTS
+= --enable-curl
74 MPD_CONF_OPTS
+= --disable-curl
77 ifeq ($(BR2_PACKAGE_MPD_DSD
),y
)
78 MPD_CONF_OPTS
+= --enable-dsd
80 MPD_CONF_OPTS
+= --disable-dsd
83 ifeq ($(BR2_PACKAGE_MPD_FAAD2
),y
)
84 MPD_DEPENDENCIES
+= faad2
85 MPD_CONF_OPTS
+= --enable-aac
87 MPD_CONF_OPTS
+= --disable-aac
90 ifeq ($(BR2_PACKAGE_MPD_FFMPEG
),y
)
91 MPD_DEPENDENCIES
+= ffmpeg
92 MPD_CONF_OPTS
+= --enable-ffmpeg
94 MPD_CONF_OPTS
+= --disable-ffmpeg
97 ifeq ($(BR2_PACKAGE_MPD_FLAC
),y
)
98 MPD_DEPENDENCIES
+= flac
99 MPD_CONF_OPTS
+= --enable-flac
101 MPD_CONF_OPTS
+= --disable-flac
104 ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT
),y
)
105 MPD_CONF_OPTS
+= --enable-httpd-output
107 MPD_CONF_OPTS
+= --disable-httpd-output
110 ifeq ($(BR2_PACKAGE_MPD_JACK2
),y
)
111 MPD_DEPENDENCIES
+= jack2
112 MPD_CONF_OPTS
+= --enable-jack
114 MPD_CONF_OPTS
+= --disable-jack
117 ifeq ($(BR2_PACKAGE_MPD_LAME
),y
)
118 MPD_DEPENDENCIES
+= lame
119 MPD_CONF_OPTS
+= --enable-lame-encoder
121 MPD_CONF_OPTS
+= --disable-lame-encoder
124 ifeq ($(BR2_PACKAGE_MPD_LIBNFS
),y
)
125 MPD_DEPENDENCIES
+= libnfs
126 MPD_CONF_OPTS
+= --enable-nfs
128 MPD_CONF_OPTS
+= --disable-nfs
131 ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT
),y
)
132 MPD_DEPENDENCIES
+= samba4
133 MPD_CONF_OPTS
+= --enable-smbclient
135 MPD_CONF_OPTS
+= --disable-smbclient
138 ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE
),y
)
139 MPD_DEPENDENCIES
+= libsamplerate
140 MPD_CONF_OPTS
+= --enable-lsr
142 MPD_CONF_OPTS
+= --disable-lsr
145 ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE
),y
)
146 MPD_DEPENDENCIES
+= libsndfile
147 MPD_CONF_OPTS
+= --enable-sndfile
149 MPD_CONF_OPTS
+= --disable-sndfile
152 ifeq ($(BR2_PACKAGE_MPD_LIBSOXR
),y
)
153 MPD_DEPENDENCIES
+= libsoxr
154 MPD_CONF_OPTS
+= --enable-soxr
156 MPD_CONF_OPTS
+= --disable-soxr
159 ifeq ($(BR2_PACKAGE_MPD_MAD
),y
)
160 MPD_DEPENDENCIES
+= libid3tag libmad
161 MPD_CONF_OPTS
+= --enable-mad
163 MPD_CONF_OPTS
+= --disable-mad
166 ifeq ($(BR2_PACKAGE_MPD_MPG123
),y
)
167 MPD_DEPENDENCIES
+= libid3tag mpg123
168 MPD_CONF_OPTS
+= --enable-mpg123
170 MPD_CONF_OPTS
+= --disable-mpg123
173 ifeq ($(BR2_PACKAGE_MPD_MUSEPACK
),y
)
174 MPD_DEPENDENCIES
+= musepack
175 MPD_CONF_OPTS
+= --enable-mpc
177 MPD_CONF_OPTS
+= --disable-mpc
180 ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT
),y
)
181 MPD_CONF_OPTS
+= --enable-neighbor-plugins
183 MPD_CONF_OPTS
+= --disable-neighbor-plugins
186 ifeq ($(BR2_PACKAGE_MPD_OPUS
),y
)
187 MPD_DEPENDENCIES
+= opus libogg
188 MPD_CONF_OPTS
+= --enable-opus
190 MPD_CONF_OPTS
+= --disable-opus
193 ifeq ($(BR2_PACKAGE_MPD_OSS
),y
)
194 MPD_CONF_OPTS
+= --enable-oss
196 MPD_CONF_OPTS
+= --disable-oss
199 ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO
),y
)
200 MPD_DEPENDENCIES
+= pulseaudio
201 MPD_CONF_OPTS
+= --enable-pulse
203 MPD_CONF_OPTS
+= --disable-pulse
206 ifeq ($(BR2_PACKAGE_MPD_SHOUTCAST
),y
)
207 MPD_DEPENDENCIES
+= libshout
208 MPD_CONF_OPTS
+= --enable-shout
210 MPD_CONF_OPTS
+= --disable-shout
213 ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD
),y
)
214 MPD_DEPENDENCIES
+= yajl
215 MPD_CONF_OPTS
+= --enable-soundcloud
217 MPD_CONF_OPTS
+= --disable-soundcloud
220 ifeq ($(BR2_PACKAGE_MPD_SQLITE
),y
)
221 MPD_DEPENDENCIES
+= sqlite
222 MPD_CONF_OPTS
+= --enable-sqlite
224 MPD_CONF_OPTS
+= --disable-sqlite
227 ifneq ($(BR2_PACKAGE_MPD_TCP
),y
)
228 MPD_CONF_OPTS
+= --disable-tcp
231 ifeq ($(BR2_PACKAGE_MPD_TREMOR
),y
)
232 MPD_DEPENDENCIES
+= tremor
233 # Help mpd to find tremor in static linking scenarios
235 TREMOR_LIBS
="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`"
236 MPD_CONF_OPTS
+= --with-tremor
=$(STAGING_DIR
)/usr
239 ifeq ($(BR2_PACKAGE_MPD_TWOLAME
),y
)
240 MPD_DEPENDENCIES
+= twolame
241 MPD_CONF_OPTS
+= --enable-twolame-encoder
243 MPD_CONF_OPTS
+= --disable-twolame-encoder
246 ifeq ($(BR2_PACKAGE_MPD_UPNP
),y
)
247 MPD_DEPENDENCIES
+= expat libupnp
248 MPD_CONF_OPTS
+= --enable-upnp
250 MPD_CONF_OPTS
+= --disable-upnp
253 ifeq ($(BR2_PACKAGE_MPD_VORBIS
),y
)
254 MPD_DEPENDENCIES
+= libvorbis
255 MPD_CONF_OPTS
+= --enable-vorbis
--enable-vorbis-encoder
257 MPD_CONF_OPTS
+= --disable-vorbis
--disable-vorbis-encoder
260 ifeq ($(BR2_PACKAGE_MPD_WAVPACK
),y
)
261 MPD_DEPENDENCIES
+= wavpack
262 MPD_CONF_OPTS
+= --enable-wavpack
264 MPD_CONF_OPTS
+= --disable-wavpack
267 define MPD_INSTALL_EXTRA_FILES
268 $(INSTALL
) -m
0644 -D package
/mpd
/mpd.conf
$(TARGET_DIR
)/etc
/mpd.conf
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
278 $(eval
$(autotools-package
))