1################################################################################ 2# 3# shairport-sync 4# 5################################################################################ 6 7SHAIRPORT_SYNC_VERSION = 3.3.8 8SHAIRPORT_SYNC_SITE = $(call github,mikebrady,shairport-sync,$(SHAIRPORT_SYNC_VERSION)) 9 10SHAIRPORT_SYNC_LICENSE = MIT, BSD-3-Clause 11SHAIRPORT_SYNC_LICENSE_FILES = LICENSES 12SHAIRPORT_SYNC_DEPENDENCIES = alsa-lib libconfig popt host-pkgconf 13 14# git clone, no configure 15SHAIRPORT_SYNC_AUTORECONF = YES 16 17SHAIRPORT_SYNC_CONF_OPTS = --with-alsa \ 18 --with-metadata \ 19 --with-pipe \ 20 --with-stdout 21 22SHAIRPORT_SYNC_CONF_ENV += LIBS="$(SHAIRPORT_SYNC_CONF_LIBS)" 23 24# Avahi or tinysvcmdns (shaiport-sync bundles its own version of tinysvcmdns). 25# Avahi support needs libavahi-client, which is built by avahi if avahi-daemon 26# and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config 27# option yet, use the avahi-daemon and dbus congig symbols to check for 28# libavahi-client. 29ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) 30SHAIRPORT_SYNC_DEPENDENCIES += avahi 31SHAIRPORT_SYNC_CONF_OPTS += --with-avahi --without-tinysvcmdns 32else 33SHAIRPORT_SYNC_CONF_OPTS += --without-avahi --with-tinysvcmdns 34endif 35 36ifeq ($(BR2_PACKAGE_LIBDAEMON),y) 37SHAIRPORT_SYNC_DEPENDENCIES += libdaemon 38SHAIRPORT_SYNC_CONF_OPTS += --with-libdaemon 39else 40SHAIRPORT_SYNC_CONF_OPTS += --without-libdaemon 41endif 42 43# OpenSSL or mbedTLS 44ifeq ($(BR2_PACKAGE_OPENSSL),y) 45SHAIRPORT_SYNC_DEPENDENCIES += openssl 46SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=openssl 47else 48SHAIRPORT_SYNC_DEPENDENCIES += mbedtls 49SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=mbedtls 50SHAIRPORT_SYNC_CONF_LIBS += -lmbedx509 -lmbedcrypto 51ifeq ($(BR2_PACKAGE_MBEDTLS_COMPRESSION),y) 52SHAIRPORT_SYNC_CONF_LIBS += -lz 53endif 54endif 55 56ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION),y) 57SHAIRPORT_SYNC_DEPENDENCIES += libsndfile 58SHAIRPORT_SYNC_CONF_OPTS += --with-convolution 59else 60SHAIRPORT_SYNC_CONF_OPTS += --without-convolution 61endif 62 63ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_DBUS),y) 64SHAIRPORT_SYNC_DEPENDENCIES += libglib2 65SHAIRPORT_SYNC_CONF_OPTS += --with-dbus-interface --with-mpris-interface 66else 67SHAIRPORT_SYNC_CONF_OPTS += --without-dbus-interface --without-mpris-interface 68endif 69 70ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR),y) 71SHAIRPORT_SYNC_DEPENDENCIES += libsoxr 72SHAIRPORT_SYNC_CONF_OPTS += --with-soxr 73else 74SHAIRPORT_SYNC_CONF_OPTS += --without-soxr 75endif 76 77ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_MQTT),y) 78SHAIRPORT_SYNC_DEPENDENCIES += avahi dbus mosquitto 79SHAIRPORT_SYNC_CONF_OPTS += --with-mqtt-client 80else 81SHAIRPORT_SYNC_CONF_OPTS += --without-mqtt-client 82endif 83 84define SHAIRPORT_SYNC_INSTALL_TARGET_CMDS 85 $(INSTALL) -D -m 0755 $(@D)/shairport-sync \ 86 $(TARGET_DIR)/usr/bin/shairport-sync 87 $(INSTALL) -D -m 0644 $(@D)/scripts/shairport-sync.conf \ 88 $(TARGET_DIR)/etc/shairport-sync.conf 89endef 90 91define SHAIRPORT_SYNC_INSTALL_INIT_SYSV 92 $(INSTALL) -D -m 0755 package/shairport-sync/S99shairport-sync \ 93 $(TARGET_DIR)/etc/init.d/S99shairport-sync 94endef 95 96$(eval $(autotools-package)) 97