1
0

Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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.8.4-743
  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:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=b6ea4a11366330790f5e36bd875b45bb19a9772dfc984c462f436dfca30256c0
  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/description
  78. $(call Package/squeezelite/description/default)
  79. .
  80. This package has all the audio codecs compiled in.
  81. endef
  82. define Package/squeezelite-mini/description
  83. $(call Package/squeezelite/description/default)
  84. .
  85. This package will dynamically load installed codecs.
  86. endef
  87. #ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  88. # PKG_BUILD_DEPENDS+= libffmpeg-audio-dec
  89. #endif
  90. TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE
  91. ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  92. TARGET_CFLAGS+= -DFFMPEG
  93. endif
  94. ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
  95. TARGET_CFLAGS+= -DDSD
  96. endif
  97. ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
  98. TARGET_CFLAGS+= -DRESAMPLE
  99. endif
  100. TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt
  101. ifeq ($(BUILD_VARIANT),full)
  102. TARGET_CFLAGS+= -DLINKALL
  103. TARGET_LDFLAGS+= -lvorbis -logg
  104. endif
  105. define Package/squeezelite/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
  108. $(INSTALL_DIR) $(1)/etc/init.d
  109. $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
  110. $(INSTALL_DIR) $(1)/etc/config
  111. $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
  112. endef
  113. Package/squeezelite-mini/install=$(Package/squeezelite/install)
  114. Package/squeezelite-full/install=$(Package/squeezelite/install)
  115. $(eval $(call BuildPackage,squeezelite-mini))
  116. $(eval $(call BuildPackage,squeezelite-full))