You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
4.0 KiB

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