-
Notifications
You must be signed in to change notification settings - Fork 6
/
shairport_sync_pulseaudio.mk
102 lines (87 loc) · 3.52 KB
/
shairport_sync_pulseaudio.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
################################################################################
#
# shairport-sync
#
################################################################################
SHAIRPORT_SYNC_PULSEAUDIO_VERSION = 4.1.1
SHAIRPORT_SYNC_PULSEAUDIO_SITE = $(call github,mikebrady,shairport-sync,$(SHAIRPORT_SYNC_PULSEAUDIO_VERSION))
SHAIRPORT_SYNC_PULSEAUDIO_LICENSE = MIT, BSD-3-Clause
SHAIRPORT_SYNC_PULSEAUDIO_LICENSE_FILES = LICENSES
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES = alsa-lib libconfig popt host-pkgconf pulseaudio
# git clone, no configure
SHAIRPORT_SYNC_PULSEAUDIO_AUTORECONF = YES
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS = --with-alsa \
--with-pa \
--with-metadata \
--with-pipe \
--with-stdout
SHAIRPORT_SYNC_PULSEAUDIO_CONF_ENV += LIBS="$(SHAIRPORT_SYNC_PULSEAUDIO_CONF_LIBS)"
# Avahi or tinysvcmdns (shaiport-sync bundles its own version of tinysvcmdns).
ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += avahi
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-avahi --without-tinysvcmdns
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-avahi --with-tinysvcmdns
endif
ifeq ($(BR2_PACKAGE_LIBDAEMON),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += libdaemon
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-libdaemon
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-libdaemon
endif
# OpenSSL or mbedTLS
ifeq ($(BR2_PACKAGE_OPENSSL),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += openssl
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-ssl=openssl
else
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += mbedtls
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-ssl=mbedtls
SHAIRPORT_SYNC_PULSEAUDIO_CONF_LIBS += -lmbedx509 -lmbedcrypto
ifeq ($(BR2_PACKAGE_MBEDTLS_COMPRESSION),y)
SHAIRPORT_SYNC_PULSEAUDIO_CONF_LIBS += -lz
endif
endif
ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_PULSEAUDIO_CONVOLUTION),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += libsndfile
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-convolution
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-convolution
endif
ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_PULSEAUDIO_DBUS),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += libglib2
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-dbus-interface --with-mpris-interface
define SHAIRPORT_SYNC_PULSEAUDIO_INSTALL_DBUS
$(INSTALL) -m 0644 -D \
$(@D)/scripts/shairport-sync-dbus-policy.conf \
$(TARGET_DIR)/etc/dbus-1/system.d/shairport-sync-dbus.conf
$(INSTALL) -m 0644 -D \
$(@D)/scripts/shairport-sync-mpris-policy.conf \
$(TARGET_DIR)/etc/dbus-1/system.d/shairport-sync-mpris.conf
endef
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-dbus-interface --without-mpris-interface
endif
ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_PULSEAUDIO_LIBSOXR),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += libsoxr
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-soxr
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-soxr
endif
ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_PULSEAUDIO_MQTT),y)
SHAIRPORT_SYNC_PULSEAUDIO_DEPENDENCIES += avahi dbus mosquitto
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --with-mqtt-client
else
SHAIRPORT_SYNC_PULSEAUDIO_CONF_OPTS += --without-mqtt-client
endif
define SHAIRPORT_SYNC_PULSEAUDIO_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/shairport-sync \
$(TARGET_DIR)/usr/bin/shairport-sync
$(INSTALL) -D -m 0644 $(@D)/scripts/shairport-sync.conf \
$(TARGET_DIR)/etc/shairport-sync.conf
$(SHAIRPORT_SYNC_PULSEAUDIO_INSTALL_DBUS)
endef
define SHAIRPORT_SYNC_PULSEAUDIO_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/shairport-sync/S99shairport-sync \
$(TARGET_DIR)/etc/init.d/S99shairport-sync
endef
$(eval $(autotools-package))