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.

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