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.

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