2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-01-20 21:49:42 +01:00
|
|
|
#
|
|
|
|
# mpd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-01-20 21:49:42 +01:00
|
|
|
|
2017-02-15 15:51:02 +01:00
|
|
|
MPD_VERSION_MAJOR = $(call qstrip,$(BR2_PACKAGE_MPD_VERSION_STRING))
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_VERSION_0_20),y)
|
2017-03-10 20:42:50 +01:00
|
|
|
MPD_VERSION = $(MPD_VERSION_MAJOR).6
|
2017-02-15 15:51:02 +01:00
|
|
|
else
|
|
|
|
MPD_VERSION = $(MPD_VERSION_MAJOR).21
|
|
|
|
endif
|
2013-09-06 08:14:15 +02:00
|
|
|
MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
|
2014-01-02 18:46:12 +01:00
|
|
|
MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR)
|
2017-01-15 21:34:35 +01:00
|
|
|
MPD_DEPENDENCIES = host-pkgconf boost
|
2014-01-13 23:17:18 +01:00
|
|
|
MPD_LICENSE = GPLv2+
|
2012-08-12 00:27:29 +02:00
|
|
|
MPD_LICENSE_FILES = COPYING
|
2016-02-07 21:54:33 +01:00
|
|
|
MPD_AUTORECONF = YES
|
2011-01-20 21:49:42 +01:00
|
|
|
|
2017-02-16 09:26:29 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_VERSION_0_19),y)
|
2017-02-15 15:51:02 +01:00
|
|
|
MPD_DEPENDENCIES += libglib2
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
# Some options need an explicit --disable or --enable
|
2014-10-17 00:29:03 +02:00
|
|
|
|
|
|
|
# Zeroconf support depends on libdns_sd from avahi.
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y)
|
2014-06-03 23:50:33 +02:00
|
|
|
MPD_DEPENDENCIES += avahi
|
2014-10-17 00:29:03 +02:00
|
|
|
MPD_CONF_OPTS += --with-zeroconf=avahi
|
2014-06-03 23:50:33 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --with-zeroconf=no
|
2014-06-03 23:50:33 +02:00
|
|
|
endif
|
2011-01-20 21:49:42 +01:00
|
|
|
|
2014-10-17 00:28:56 +02:00
|
|
|
# MPD prefers libicu for utf8 collation instead of libglib2.
|
|
|
|
ifeq ($(BR2_PACKAGE_ICU),y)
|
|
|
|
MPD_DEPENDENCIES += icu
|
|
|
|
MPD_CONF_OPTS += --enable-icu
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-icu
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
|
|
|
|
MPD_DEPENDENCIES += alsa-lib
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-alsa
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-alsa
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_AO),y)
|
|
|
|
MPD_DEPENDENCIES += libao
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-ao
|
2014-08-11 13:42:53 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-ao
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2012-04-23 05:31:37 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y)
|
|
|
|
MPD_DEPENDENCIES += audiofile
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-audiofile
|
2014-08-11 13:42:53 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-audiofile
|
2012-04-23 05:31:37 +02:00
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
|
|
|
|
MPD_DEPENDENCIES += bzip2
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-bzip2
|
2014-08-11 13:42:53 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-bzip2
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_CURL),y)
|
|
|
|
MPD_DEPENDENCIES += libcurl
|
|
|
|
MPD_CONF_OPTS += --enable-curl
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-curl
|
|
|
|
endif
|
|
|
|
|
2014-10-17 00:29:02 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_DSD),y)
|
|
|
|
MPD_CONF_OPTS += --enable-dsd
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-dsd
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
|
|
|
|
MPD_DEPENDENCIES += faad2
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-aac
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-aac
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
|
|
|
|
MPD_DEPENDENCIES += ffmpeg
|
|
|
|
MPD_CONF_OPTS += --enable-ffmpeg
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-ffmpeg
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
|
|
|
|
MPD_DEPENDENCIES += flac
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-flac
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-flac
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2016-01-19 23:45:51 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y)
|
|
|
|
MPD_CONF_OPTS += --enable-httpd-output
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-httpd-output
|
|
|
|
endif
|
|
|
|
|
2014-08-08 15:11:32 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
|
|
|
|
MPD_DEPENDENCIES += jack2
|
|
|
|
MPD_CONF_OPTS += --enable-jack
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-jack
|
|
|
|
endif
|
|
|
|
|
2011-02-10 18:58:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LAME),y)
|
|
|
|
MPD_DEPENDENCIES += lame
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-lame-encoder
|
2011-02-10 18:58:14 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-lame-encoder
|
2011-02-10 18:58:14 +01:00
|
|
|
endif
|
|
|
|
|
2014-10-17 00:29:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y)
|
|
|
|
MPD_DEPENDENCIES += libnfs
|
|
|
|
MPD_CONF_OPTS += --enable-nfs
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-nfs
|
|
|
|
endif
|
|
|
|
|
2014-10-17 00:29:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y)
|
2015-03-06 13:50:30 +01:00
|
|
|
MPD_DEPENDENCIES += samba4
|
2014-10-17 00:29:00 +02:00
|
|
|
MPD_CONF_OPTS += --enable-smbclient
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-smbclient
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
|
|
|
|
MPD_DEPENDENCIES += libsamplerate
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-lsr
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-lsr
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
|
|
|
|
MPD_DEPENDENCIES += libsndfile
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-sndfile
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-sndfile
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:59 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y)
|
|
|
|
MPD_DEPENDENCIES += libsoxr
|
|
|
|
MPD_CONF_OPTS += --enable-soxr
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-soxr
|
|
|
|
endif
|
|
|
|
|
2014-08-11 13:42:54 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_MAD),y)
|
|
|
|
MPD_DEPENDENCIES += libid3tag libmad
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-mad
|
2014-08-11 13:42:54 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-mad
|
2014-08-11 13:42:54 +02:00
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
|
|
|
|
MPD_DEPENDENCIES += libid3tag mpg123
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-mpg123
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-mpg123
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
|
|
|
|
MPD_DEPENDENCIES += musepack
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-mpc
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-mpc
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2014-12-08 23:44:53 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y)
|
|
|
|
MPD_CONF_OPTS += --enable-neighbor-plugins
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-neighbor-plugins
|
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_OPUS),y)
|
|
|
|
MPD_DEPENDENCIES += opus libogg
|
|
|
|
MPD_CONF_OPTS += --enable-opus
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-opus
|
|
|
|
endif
|
|
|
|
|
2014-12-08 23:44:54 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_OSS),y)
|
|
|
|
MPD_CONF_OPTS += --enable-oss
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-oss
|
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
|
|
|
|
MPD_DEPENDENCIES += pulseaudio
|
|
|
|
MPD_CONF_OPTS += --enable-pulse
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-pulse
|
|
|
|
endif
|
|
|
|
|
2016-09-01 00:16:55 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_SHOUTCAST),y)
|
|
|
|
MPD_DEPENDENCIES += libshout
|
|
|
|
MPD_CONF_OPTS += --enable-shout
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-shout
|
|
|
|
endif
|
|
|
|
|
2014-01-13 23:17:18 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
|
|
|
|
MPD_DEPENDENCIES += yajl
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-soundcloud
|
2014-01-13 23:17:18 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-soundcloud
|
2014-01-13 23:17:18 +01:00
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
|
|
|
|
MPD_DEPENDENCIES += sqlite
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-sqlite
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-sqlite
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_MPD_TCP),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-tcp
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
|
|
|
|
MPD_DEPENDENCIES += tremor
|
2017-01-10 23:39:25 +01:00
|
|
|
# Help mpd to find tremor in static linking scenarios
|
|
|
|
MPD_CONF_ENV += \
|
|
|
|
TREMOR_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`"
|
|
|
|
MPD_CONF_OPTS += --with-tremor=$(STAGING_DIR)/usr
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
2014-07-09 20:12:08 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y)
|
|
|
|
MPD_DEPENDENCIES += twolame
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-twolame-encoder
|
2014-08-11 13:42:53 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-twolame-encoder
|
2014-07-09 20:12:08 +02:00
|
|
|
endif
|
|
|
|
|
2014-10-28 13:48:08 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
|
|
|
|
MPD_DEPENDENCIES += expat libupnp
|
|
|
|
MPD_CONF_OPTS += --enable-upnp
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-upnp
|
|
|
|
endif
|
|
|
|
|
2014-10-17 00:28:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
|
|
|
|
MPD_DEPENDENCIES += libvorbis
|
|
|
|
MPD_CONF_OPTS += --enable-vorbis --enable-vorbis-encoder
|
|
|
|
else
|
|
|
|
MPD_CONF_OPTS += --disable-vorbis --disable-vorbis-encoder
|
|
|
|
endif
|
|
|
|
|
2011-01-20 21:49:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
|
|
|
|
MPD_DEPENDENCIES += wavpack
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --enable-wavpack
|
2011-01-20 21:49:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MPD_CONF_OPTS += --disable-wavpack
|
2011-01-20 21:49:42 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
define MPD_INSTALL_EXTRA_FILES
|
2014-11-30 15:19:01 +01:00
|
|
|
$(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
|
2011-01-20 21:49:42 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
|
|
|
|
|
2014-11-30 15:18:15 +01:00
|
|
|
define MPD_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/mpd/S95mpd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S95mpd
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|