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