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.

141 lines
3.8 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=squeezelite
  7. PKG_VERSION:=1.9.1-1130
  8. PKG_RELEASE:=1
  9. PKG_LICENSE:=GPL-3.0
  10. PKG_LICENSE_FILES:=LICENSE.txt
  11. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=451cad8da651073d18118fb9ca39faef550825ff
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=e6082b486e364c8cbd7db96fc06dc5243242a3ac786113e42e3061c06ea8889e
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/squeezelite/default
  21. SECTION:=sound
  22. CATEGORY:=Sound
  23. TITLE:=Headless squeezebox emulator
  24. PROVIDES:=squeezelite
  25. URL:=https://github.com/ralph-irving/squeezelite
  26. DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr
  27. MENU:=1
  28. endef
  29. define Package/squeezelite-full
  30. $(call Package/squeezelite/default)
  31. TITLE+= (full)
  32. DEPENDS+= +libflac +libvorbis +libmpg123 +libfaad2 \
  33. +SQUEEZELITE_WMA:libffmpeg-audio-dec
  34. VARIANT:=full
  35. endef
  36. define Package/squeezelite-mini
  37. $(call Package/squeezelite/default)
  38. TITLE+= (minimal)
  39. VARIANT:=mini
  40. endef
  41. define Package/squeezelite/config/default
  42. config SQUEEZELITE_WMA
  43. bool "WMA/ALAC decode support"
  44. help
  45. Include WMA and ALAC decoding using ffmpeg
  46. default n
  47. config SQUEEZELITE_RESAMPLE
  48. bool "Resample support"
  49. help
  50. Include support for resampling using libsoxr
  51. default n
  52. config SQUEEZELITE_DSD
  53. bool "DSD playback over PCM (DoP)"
  54. help
  55. Include support for DSD over PCM for compatible DAC"
  56. default n
  57. endef
  58. define Package/squeezelite-full/config
  59. if PACKAGE_squeezelite-full
  60. $(call Package/squeezelite/config/default)
  61. endif
  62. endef
  63. define Package/squeezelite-mini/config
  64. if PACKAGE_squeezelite-mini
  65. $(call Package/squeezelite/config/default)
  66. endif
  67. endef
  68. define Package/squeezelite/description/default
  69. Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
  70. It is aimed at supporting high quality audio at multiple sample rates including
  71. 44.1/48/88.2/96/176.4/192k/352.8/384kHz
  72. Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
  73. Native support for PCM builtin
  74. Optional support of DSD playback via PCM for DoP capable DAC
  75. Optional resampling to match sound device
  76. endef
  77. define Package/squeezelite-full/description
  78. $(call Package/squeezelite/description/default)
  79. This package has all the audio codecs compiled in.
  80. endef
  81. define Package/squeezelite-mini/description
  82. $(call Package/squeezelite/description/default)
  83. This package will dynamically load installed codecs.
  84. endef
  85. ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  86. opts+= -DFFMPEG
  87. endif
  88. ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
  89. opts+= -DDSD
  90. endif
  91. ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
  92. opts+= -DRESAMPLE
  93. endif
  94. ifeq ($(BUILD_VARIANT),full)
  95. opts+= -DLINKALL
  96. endif
  97. MAKE_FLAGS+=OPTS="$(opts)"
  98. # Squeezelite uses functions which are deprecated in recent ffmpeg versions.
  99. # See https://github.com/ralph-irving/squeezelite/issues/60
  100. TARGET_CFLAGS+=-Wno-deprecated-declarations
  101. define Package/squeezelite/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
  104. $(INSTALL_DIR) $(1)/etc/init.d
  105. $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
  106. $(INSTALL_DIR) $(1)/etc/config
  107. $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
  108. endef
  109. Package/squeezelite-mini/install=$(Package/squeezelite/install)
  110. Package/squeezelite-full/install=$(Package/squeezelite/install)
  111. $(eval $(call BuildPackage,squeezelite-mini))
  112. $(eval $(call BuildPackage,squeezelite-full))