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.

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