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.

123 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.3.8
  9. PKG_RELEASE:=$(AUTORELEASE)
  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:=c92f9a2d86dd1138673abc66e0010c94412ad6a46da8f36c3d538f4fa6b9faca
  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-libdaemon \
  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/config/shairport-sync
  80. /etc/shairport-sync.conf
  81. endef
  82. Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles)
  83. Package/shairport-sync-mbedtls/conffiles = $(Package/shairport-sync/default/conffiles)
  84. Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles)
  85. define Package/shairport-sync/default/install
  86. $(INSTALL_DIR) $(1)/usr/bin
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/shairport-sync $(1)/usr/bin/
  88. $(INSTALL_DIR) $(1)/etc
  89. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/shairport-sync.conf $(1)/etc/shairport-sync.conf
  90. $(INSTALL_DIR) $(1)/etc/init.d
  91. $(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
  92. $(INSTALL_DIR) $(1)/etc/config
  93. $(INSTALL_CONF) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
  94. endef
  95. Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
  96. Package/shairport-sync-mbedtls/install = $(Package/shairport-sync/default/install)
  97. Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install)
  98. $(eval $(call BuildPackage,shairport-sync-openssl))
  99. $(eval $(call BuildPackage,shairport-sync-mbedtls))
  100. $(eval $(call BuildPackage,shairport-sync-mini))