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.

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