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.

143 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.9-1403
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite
  11. PKG_SOURCE_VERSION:=bc72c0de3fff771540a2a45aaafafed539387b3c
  12. PKG_MIRROR_HASH:=25f6c320e52b53c0340a337429b91d59783c87f1af3454dc0434c24b90ed3b94
  13. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=LICENSE.txt
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/squeezelite/default
  19. SECTION:=sound
  20. CATEGORY:=Sound
  21. TITLE:=Headless squeezebox emulator
  22. PROVIDES:=squeezelite
  23. URL:=https://github.com/ralph-irving/squeezelite
  24. DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr
  25. MENU:=1
  26. endef
  27. define Package/squeezelite-full
  28. $(call Package/squeezelite/default)
  29. TITLE+= (full)
  30. DEPENDS+= +libflac +libvorbis +libmpg123 +libfaad2 \
  31. +SQUEEZELITE_WMA:libffmpeg-audio-dec
  32. VARIANT:=full
  33. endef
  34. define Package/squeezelite-mini
  35. $(call Package/squeezelite/default)
  36. TITLE+= (minimal)
  37. VARIANT:=mini
  38. endef
  39. define Package/squeezelite/config/default
  40. config SQUEEZELITE_WMA
  41. bool "WMA/ALAC decode support"
  42. depends on BUILD_PATENTED
  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. define Package/squeezelite/conffiles
  98. /etc/config/squeezelite
  99. endef
  100. Package/squeezelite-mini/conffiles = $(Package/squeezelite/conffiles)
  101. Package/squeezelite-full/conffiles = $(Package/squeezelite/conffiles)
  102. define Package/squeezelite/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
  105. $(INSTALL_DIR) $(1)/etc/init.d
  106. $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
  107. $(INSTALL_DIR) $(1)/etc/config
  108. $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
  109. endef
  110. Package/squeezelite-mini/install=$(Package/squeezelite/install)
  111. Package/squeezelite-full/install=$(Package/squeezelite/install)
  112. $(eval $(call BuildPackage,squeezelite-mini))
  113. $(eval $(call BuildPackage,squeezelite-full))