libmicrohttpd: build parallel
[feed/packages.git] / sound / shairport-sync / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 # updated to work with latest source from abrasive
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=shairport-sync
12 PKG_VERSION:=2.6
13 PKG_RELEASE:=2
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
17 PKG_SOURCE_VERSION:=$(PKG_VERSION)
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
21 Mike Brady <mikebrady@eircom.net>
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
24
25 PKG_LICENSE:=MIT
26 PKG_LICENSE_FILES:=COPYING LICENSES shairport.c
27
28 PKG_BUILD_PARALLEL:=1
29 PKG_FIXUP:=autoreconf
30
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/shairport-sync/default
34 SECTION:=sound
35 CATEGORY:=Sound
36 TITLE:=AirPlay compatible audio player
37 DEPENDS:=@AUDIO_SUPPORT +libpthread +alsa-lib +libconfig +libdaemon +libpopt
38 URL:=http://github.com/mikebrady/shairport-sync
39 endef
40
41 define Package/shairport-sync-openssl
42 $(Package/shairport-sync/default)
43 TITLE+= (openssl)
44 DEPENDS+= +PACKAGE_shairport-sync-openssl:libopenssl +libavahi-client +libsoxr
45 VARIANT:=openssl
46 endef
47
48 define Package/shairport-sync-polarssl
49 $(Package/shairport-sync/default)
50 TITLE+= (polarssl)
51 DEPENDS+= +PACKAGE_shairport-sync-polarssl:libpolarssl +libavahi-client +libsoxr
52 VARIANT:=polarssl
53 DEFAULT_VARIANT:=1
54 endef
55
56 define Package/shairport-sync-mini
57 $(Package/shairport-sync/default)
58 TITLE+= (minimal)
59 DEPENDS+= +libpolarssl
60 VARIANT:=mini
61 endef
62
63 define Package/shairport-sync/default/description
64 Shairport Sync plays audio from iTunes and AirPlay sources, including
65 iOS devices, Quicktime Player and third party sources such as forkedDaapd.
66 Audio played by a Shairport Sync-powered device stays synchronised with the source
67 and hence with similar devices playing the same source.
68
69 Shairport Sync does not support AirPlay video or photo streaming.
70 Ensure Kernel Modules > Sound Support > kmod-sound-core is selected.
71 Also select kmod-usb-audio if you want to use USB-connected sound cards.
72 endef
73 Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description)
74 Package/shairport-sync-polarssl/description = $(Package/shairport-sync/default/description)
75
76 define Package/shairport-sync-mini/description
77 $(Package/shairport-sync/default/description)
78
79 Minimal version uses PolarSSL and does not include libsoxr and avahi support.
80 endef
81
82 CONFIGURE_ARGS+= \
83 --with-alsa \
84 --with-metadata
85
86 ifeq ($(BUILD_VARIANT),openssl)
87 CONFIGURE_ARGS+= --with-ssl=openssl
88 endif
89
90 ifeq ($(BUILD_VARIANT),polarssl)
91 CONFIGURE_ARGS+= --with-ssl=polarssl
92 endif
93
94 ifeq ($(BUILD_VARIANT),mini)
95 CONFIGURE_ARGS+= --with-ssl=polarssl --with-tinysvcmdns
96 else
97 CONFIGURE_ARGS+= --with-avahi --with-soxr
98 endif
99
100 define Package/shairport-sync/default/conffiles
101 /etc/shairport-sync.conf
102 endef
103
104 Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles)
105 Package/shairport-sync-polarssl/conffiles = $(Package/shairport-sync/default/conffiles)
106 Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles)
107
108 define Package/shairport-sync/default/install
109 $(INSTALL_DIR) $(1)/usr/bin
110 $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport-sync $(1)/usr/bin/
111 $(INSTALL_DIR) $(1)/etc
112 $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/shairport-sync.conf $(1)/etc/shairport-sync.conf
113 $(INSTALL_DIR) $(1)/etc/init.d
114 $(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
115 $(INSTALL_DIR) $(1)/etc/config
116 $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
117 endef
118
119 Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
120 Package/shairport-sync-polarssl/install = $(Package/shairport-sync/default/install)
121 Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install)
122
123 $(eval $(call BuildPackage,shairport-sync-openssl))
124 $(eval $(call BuildPackage,shairport-sync-polarssl))
125 $(eval $(call BuildPackage,shairport-sync-mini))