1 ################################################################################
5 ################################################################################
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
13 MPD_LICENSE_FILES = COPYING
15 # Some options need an explicit --disable or --enable
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
22 MPD_CONF_OPTS += --with-zeroconf=no
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
30 MPD_CONF_OPTS += --disable-icu
33 ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
34 MPD_DEPENDENCIES += alsa-lib
35 MPD_CONF_OPTS += --enable-alsa
37 MPD_CONF_OPTS += --disable-alsa
40 ifeq ($(BR2_PACKAGE_MPD_AO),y)
41 MPD_DEPENDENCIES += libao
42 MPD_CONF_OPTS += --enable-ao
44 MPD_CONF_OPTS += --disable-ao
47 ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y)
48 MPD_DEPENDENCIES += audiofile
49 MPD_CONF_OPTS += --enable-audiofile
51 MPD_CONF_OPTS += --disable-audiofile
54 ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
55 MPD_DEPENDENCIES += bzip2
56 MPD_CONF_OPTS += --enable-bzip2
58 MPD_CONF_OPTS += --disable-bzip2
61 ifeq ($(BR2_PACKAGE_MPD_CURL),y)
62 MPD_DEPENDENCIES += libcurl
63 MPD_CONF_OPTS += --enable-curl
65 MPD_CONF_OPTS += --disable-curl
68 ifeq ($(BR2_PACKAGE_MPD_DSD),y)
69 MPD_CONF_OPTS += --enable-dsd
71 MPD_CONF_OPTS += --disable-dsd
74 ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
75 MPD_DEPENDENCIES += faad2
76 MPD_CONF_OPTS += --enable-aac
78 MPD_CONF_OPTS += --disable-aac
81 ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
82 MPD_DEPENDENCIES += ffmpeg
83 MPD_CONF_OPTS += --enable-ffmpeg
85 MPD_CONF_OPTS += --disable-ffmpeg
88 ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
89 MPD_DEPENDENCIES += flac
90 MPD_CONF_OPTS += --enable-flac
92 MPD_CONF_OPTS += --disable-flac
95 ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
96 MPD_DEPENDENCIES += jack2
97 MPD_CONF_OPTS += --enable-jack
99 MPD_CONF_OPTS += --disable-jack
102 ifeq ($(BR2_PACKAGE_MPD_LAME),y)
103 MPD_DEPENDENCIES += lame
104 MPD_CONF_OPTS += --enable-lame-encoder
106 MPD_CONF_OPTS += --disable-lame-encoder
109 ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y)
110 MPD_DEPENDENCIES += libnfs
111 MPD_CONF_OPTS += --enable-nfs
113 MPD_CONF_OPTS += --disable-nfs
116 ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y)
117 MPD_DEPENDENCIES += samba4
118 MPD_CONF_OPTS += --enable-smbclient
120 MPD_CONF_OPTS += --disable-smbclient
123 ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
124 MPD_DEPENDENCIES += libsamplerate
125 MPD_CONF_OPTS += --enable-lsr
127 MPD_CONF_OPTS += --disable-lsr
130 ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
131 MPD_DEPENDENCIES += libsndfile
132 MPD_CONF_OPTS += --enable-sndfile
134 MPD_CONF_OPTS += --disable-sndfile
137 ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y)
138 MPD_DEPENDENCIES += libsoxr
139 MPD_CONF_OPTS += --enable-soxr
141 MPD_CONF_OPTS += --disable-soxr
144 ifeq ($(BR2_PACKAGE_MPD_MAD),y)
145 MPD_DEPENDENCIES += libid3tag libmad
146 MPD_CONF_OPTS += --enable-mad
148 MPD_CONF_OPTS += --disable-mad
151 ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
152 MPD_DEPENDENCIES += libid3tag mpg123
153 MPD_CONF_OPTS += --enable-mpg123
155 MPD_CONF_OPTS += --disable-mpg123
158 ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
159 MPD_DEPENDENCIES += musepack
160 MPD_CONF_OPTS += --enable-mpc
162 MPD_CONF_OPTS += --disable-mpc
165 ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y)
166 MPD_CONF_OPTS += --enable-neighbor-plugins
168 MPD_CONF_OPTS += --disable-neighbor-plugins
171 ifeq ($(BR2_PACKAGE_MPD_OPUS),y)
172 MPD_DEPENDENCIES += opus libogg
173 MPD_CONF_OPTS += --enable-opus
175 MPD_CONF_OPTS += --disable-opus
178 ifeq ($(BR2_PACKAGE_MPD_OSS),y)
179 MPD_CONF_OPTS += --enable-oss
181 MPD_CONF_OPTS += --disable-oss
184 ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
185 MPD_DEPENDENCIES += pulseaudio
186 MPD_CONF_OPTS += --enable-pulse
188 MPD_CONF_OPTS += --disable-pulse
191 ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
192 MPD_DEPENDENCIES += yajl
193 MPD_CONF_OPTS += --enable-soundcloud
195 MPD_CONF_OPTS += --disable-soundcloud
198 ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
199 MPD_DEPENDENCIES += sqlite
200 MPD_CONF_OPTS += --enable-sqlite
202 MPD_CONF_OPTS += --disable-sqlite
205 ifneq ($(BR2_PACKAGE_MPD_TCP),y)
206 MPD_CONF_OPTS += --disable-tcp
209 ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
210 MPD_DEPENDENCIES += tremor
211 MPD_CONF_OPTS += --with-tremor
214 ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y)
215 MPD_DEPENDENCIES += twolame
216 MPD_CONF_OPTS += --enable-twolame-encoder
218 MPD_CONF_OPTS += --disable-twolame-encoder
221 ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
222 MPD_DEPENDENCIES += expat libupnp
223 MPD_CONF_OPTS += --enable-upnp
225 MPD_CONF_OPTS += --disable-upnp
228 ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
229 MPD_DEPENDENCIES += libvorbis
230 MPD_CONF_OPTS += --enable-vorbis --enable-vorbis-encoder
232 MPD_CONF_OPTS += --disable-vorbis --disable-vorbis-encoder
235 ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
236 MPD_DEPENDENCIES += wavpack
237 MPD_CONF_OPTS += --enable-wavpack
239 MPD_CONF_OPTS += --disable-wavpack
242 define MPD_INSTALL_EXTRA_FILES
243 $(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
246 MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
248 define MPD_INSTALL_INIT_SYSV
249 $(INSTALL) -m 0755 -D package/mpd/S95mpd \
250 $(TARGET_DIR)/etc/init.d/S95mpd
253 $(eval $(autotools-package))