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.

102 lines
3.5 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. # updated to work with latest source from abrasive
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=shairport-sync
  10. PKG_VERSION:=2.6
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
  14. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, 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. CONFIGURE_ARGS+= \
  25. --with-alsa \
  26. --with-avahi \
  27. --with-soxr \
  28. --with-metadata
  29. ifeq ($(BUILD_VARIANT),openssl)
  30. CONFIGURE_ARGS+= --with-ssl=openssl
  31. endif
  32. ifeq ($(BUILD_VARIANT),polarssl)
  33. CONFIGURE_ARGS+= --with-ssl=polarssl
  34. endif
  35. define Package/shairport-sync/default
  36. SECTION:=sound
  37. CATEGORY:=Sound
  38. TITLE:=iPhone/iTunes/AirPlay/Quicktime Player compatible Audio Player
  39. DEPENDS:=@AUDIO_SUPPORT +libpthread +libavahi-client +alsa-lib +libconfig +libdaemon +libsoxr +libpopt
  40. URL:=http://github.com/mikebrady/shairport-sync
  41. endef
  42. define Package/shairport-sync-openssl
  43. $(Package/shairport-sync/default)
  44. TITLE+= (openssl)
  45. DEPENDS+= +PACKAGE_shairport-sync-openssl:libopenssl
  46. VARIANT:=openssl
  47. endef
  48. define Package/shairport-sync-polarssl
  49. $(Package/shairport-sync/default)
  50. TITLE+= (polarssl)
  51. DEPENDS+= +PACKAGE_shairport-sync-polarssl:libpolarssl
  52. VARIANT:=polarssl
  53. DEFAULT_VARIANT:=1
  54. endef
  55. define Package/shairport-sync/default/description
  56. Shairport Sync plays audio from iTunes and AirPlay sources, including
  57. iOS devices, Quicktime Player and third party sources such as forkedDaapd.
  58. Audio played by a Shairport Sync-powered device stays synchronised with the source
  59. and hence with similar devices playing the same source.
  60. Thus, for example, synchronised multi-room audio is possible without difficulty.
  61. (Hence the name Shairport Sync, BTW.)
  62. Shairport Sync does not support AirPlay video or photo streaming.
  63. Ensure Kernel Modules > Sound Support > kmod-sound-core is selected.
  64. Also select kmod-usb-audio if you want to use USB-connected sound cards.
  65. endef
  66. Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description)
  67. Package/shairport-sync-polarssl/description = $(Package/shairport-sync/default/description)
  68. define Package/shairport-sync/default/conffiles
  69. /etc/shairport-sync.conf
  70. endef
  71. Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles)
  72. Package/shairport-sync-polarssl/conffiles = $(Package/shairport-sync/default/conffiles)
  73. define Package/shairport-sync/default/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport-sync $(1)/usr/bin/
  76. $(INSTALL_DIR) $(1)/etc
  77. $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/shairport-sync.conf $(1)/etc/shairport-sync.conf
  78. $(INSTALL_DIR) $(1)/etc/init.d
  79. $(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
  80. $(INSTALL_DIR) $(1)/etc/config
  81. $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
  82. endef
  83. Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
  84. Package/shairport-sync-polarssl/install = $(Package/shairport-sync/default/install)
  85. $(eval $(call BuildPackage,shairport-sync-openssl))
  86. $(eval $(call BuildPackage,shairport-sync-polarssl))