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
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.3.7
  9. PKG_RELEASE:=1
  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:=7f8d4ecec53f2f681a962467bf09205568fc936c8c31a9ee07b1bd72d3d95b12
  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_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  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/config/shairport-sync
  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_INSTALL_DIR)/usr/bin/shairport-sync $(1)/usr/bin/
  87. $(INSTALL_DIR) $(1)/etc
  88. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/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))