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.1 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.1
  9. PKG_RELEASE:=2
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/mikebrady/shairport-sync.git
  12. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  15. PKG_MIRROR_HASH:=f07553651485d04e9482ebb94eb8034fb46076664c716d060514a85b3ce8aef3
  16. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
  17. Mike Brady <mikebrady@eircom.net>
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  19. PKG_LICENSE:=MIT
  20. PKG_LICENSE_FILES:=COPYING LICENSES shairport.c
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_FIXUP:=autoreconf
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/shairport-sync/default
  25. SECTION:=sound
  26. CATEGORY:=Sound
  27. TITLE:=AirPlay compatible audio player
  28. DEPENDS:=@AUDIO_SUPPORT +libpthread +libstdcpp +alsa-lib +libconfig +libdaemon +libpopt
  29. PROVIDES:=shairport-sync
  30. URL:=https://github.com/mikebrady/shairport-sync
  31. endef
  32. define Package/shairport-sync-openssl
  33. $(Package/shairport-sync/default)
  34. TITLE+= (openssl)
  35. DEPENDS+= +libopenssl +libavahi-client +libsoxr
  36. VARIANT:=openssl
  37. endef
  38. define Package/shairport-sync-mbedtls
  39. $(Package/shairport-sync/default)
  40. TITLE+= (mbed TLS)
  41. DEPENDS+= +libmbedtls +libavahi-client +libsoxr
  42. VARIANT:=mbedtls
  43. DEFAULT_VARIANT:=1
  44. endef
  45. define Package/shairport-sync-mini
  46. $(Package/shairport-sync/default)
  47. TITLE+= (minimal)
  48. DEPENDS+= +libmbedtls
  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-mbedtls/description = $(Package/shairport-sync/default/description)
  62. define Package/shairport-sync-mini/description
  63. $(Package/shairport-sync/default/description)
  64. Minimal version uses mbed TLS 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),mbedtls)
  73. CONFIGURE_ARGS+= --with-ssl=mbedtls
  74. endif
  75. ifeq ($(BUILD_VARIANT),mini)
  76. CONFIGURE_ARGS+= --with-ssl=mbedtls --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-mbedtls/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_CONF) ./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-mbedtls/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-mbedtls))
  101. $(eval $(call BuildPackage,shairport-sync-mini))