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