]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/shairport-sync/shairport-sync.mk
wavpack: add upstream security fixes
[coffee/buildroot.git] / package / shairport-sync / shairport-sync.mk
1 ################################################################################
2 #
3 # shairport-sync
4 #
5 ################################################################################
6
7 SHAIRPORT_SYNC_VERSION = 3.1.6
8 SHAIRPORT_SYNC_SITE = $(call github,mikebrady,shairport-sync,$(SHAIRPORT_SYNC_VERSION))
9
10 SHAIRPORT_SYNC_LICENSE = MIT, BSD-3-Clause
11 SHAIRPORT_SYNC_LICENSE_FILES = LICENSES
12 SHAIRPORT_SYNC_DEPENDENCIES = alsa-lib libconfig libdaemon popt host-pkgconf
13
14 # git clone, no configure
15 SHAIRPORT_SYNC_AUTORECONF = YES
16
17 SHAIRPORT_SYNC_CONF_OPTS = --with-alsa \
18         --with-metadata \
19         --with-pipe \
20         --with-stdout
21
22 SHAIRPORT_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.
29 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
30 SHAIRPORT_SYNC_DEPENDENCIES += avahi
31 SHAIRPORT_SYNC_CONF_OPTS += --with-avahi
32 else
33 SHAIRPORT_SYNC_CONF_OPTS += --with-tinysvcmdns
34 endif
35
36 # OpenSSL or mbedTLS
37 ifeq ($(BR2_PACKAGE_OPENSSL),y)
38 SHAIRPORT_SYNC_DEPENDENCIES += openssl
39 SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=openssl
40 else
41 SHAIRPORT_SYNC_DEPENDENCIES += mbedtls
42 SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=mbedtls
43 SHAIRPORT_SYNC_CONF_LIBS += -lmbedx509 -lmbedcrypto
44 ifeq ($(BR2_PACKAGE_MBEDTLS_COMPRESSION),y)
45 SHAIRPORT_SYNC_CONF_LIBS += -lz
46 endif
47 endif
48
49 ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR),y)
50 SHAIRPORT_SYNC_DEPENDENCIES += libsoxr
51 SHAIRPORT_SYNC_CONF_OPTS += --with-soxr
52 endif
53
54 define SHAIRPORT_SYNC_INSTALL_TARGET_CMDS
55         $(INSTALL) -D -m 0755 $(@D)/shairport-sync \
56                 $(TARGET_DIR)/usr/bin/shairport-sync
57         $(INSTALL) -D -m 0644 $(@D)/scripts/shairport-sync.conf \
58                 $(TARGET_DIR)/etc/shairport-sync.conf
59 endef
60
61 define SHAIRPORT_SYNC_INSTALL_INIT_SYSV
62         $(INSTALL) -D -m 0755 package/shairport-sync/S99shairport-sync \
63                 $(TARGET_DIR)/etc/init.d/S99shairport-sync
64 endef
65
66 $(eval $(autotools-package))