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.

125 lines
4.0 KiB

  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. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=shairport-sync
  10. PKG_VERSION:=2.6
  11. PKG_RELEASE:=2
  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. URL:=http://github.com/mikebrady/shairport-sync
  31. endef
  32. define Package/shairport-sync-openssl
  33. $(Package/shairport-sync/default)
  34. TITLE+= (openssl)
  35. DEPENDS+= +PACKAGE_shairport-sync-openssl:libopenssl +libavahi-client +libsoxr
  36. VARIANT:=openssl
  37. endef
  38. define Package/shairport-sync-polarssl
  39. $(Package/shairport-sync/default)
  40. TITLE+= (polarssl)
  41. DEPENDS+= +PACKAGE_shairport-sync-polarssl:libpolarssl +libavahi-client +libsoxr
  42. VARIANT:=polarssl
  43. DEFAULT_VARIANT:=1
  44. endef
  45. define Package/shairport-sync-mini
  46. $(Package/shairport-sync/default)
  47. TITLE+= (minimal)
  48. DEPENDS+= +libpolarssl
  49. VARIANT:=mini
  50. endef
  51. define Package/shairport-sync/default/description
  52. Shairport Sync plays audio from iTunes and AirPlay sources, including
  53. iOS devices, Quicktime Player and third party sources such as forkedDaapd.
  54. Audio played by a Shairport Sync-powered device stays synchronised with the source
  55. and hence with similar devices playing the same source.
  56. Shairport Sync does not support AirPlay video or photo streaming.
  57. Ensure Kernel Modules > Sound Support > kmod-sound-core is selected.
  58. Also select kmod-usb-audio if you want to use USB-connected sound cards.
  59. endef
  60. Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description)
  61. Package/shairport-sync-polarssl/description = $(Package/shairport-sync/default/description)
  62. define Package/shairport-sync-mini/description
  63. $(Package/shairport-sync/default/description)
  64. Minimal version uses PolarSSL and does not include libsoxr and avahi support.
  65. endef
  66. CONFIGURE_ARGS+= \
  67. --with-alsa \
  68. --with-metadata
  69. ifeq ($(BUILD_VARIANT),openssl)
  70. CONFIGURE_ARGS+= --with-ssl=openssl
  71. endif
  72. ifeq ($(BUILD_VARIANT),polarssl)
  73. CONFIGURE_ARGS+= --with-ssl=polarssl
  74. endif
  75. ifeq ($(BUILD_VARIANT),mini)
  76. CONFIGURE_ARGS+= --with-ssl=polarssl --with-tinysvcmdns
  77. else
  78. CONFIGURE_ARGS+= --with-avahi --with-soxr
  79. endif
  80. define Package/shairport-sync/default/conffiles
  81. /etc/shairport-sync.conf
  82. endef
  83. Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles)
  84. Package/shairport-sync-polarssl/conffiles = $(Package/shairport-sync/default/conffiles)
  85. Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles)
  86. define Package/shairport-sync/default/install
  87. $(INSTALL_DIR) $(1)/usr/bin
  88. $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport-sync $(1)/usr/bin/
  89. $(INSTALL_DIR) $(1)/etc
  90. $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/shairport-sync.conf $(1)/etc/shairport-sync.conf
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
  93. $(INSTALL_DIR) $(1)/etc/config
  94. $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
  95. endef
  96. Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
  97. Package/shairport-sync-polarssl/install = $(Package/shairport-sync/default/install)
  98. Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install)
  99. $(eval $(call BuildPackage,shairport-sync-openssl))
  100. $(eval $(call BuildPackage,shairport-sync-polarssl))
  101. $(eval $(call BuildPackage,shairport-sync-mini))