Makefile 3.9 KB

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