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.

121 lines
4.0 KiB

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