squeezelite: bump to 1.9.9-1415
[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.9-1415
10 PKG_RELEASE:=1
11
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite
14 PKG_SOURCE_VERSION:=5361789c8df37d87a22cc2253ff746557044931a
15 PKG_MIRROR_HASH:=c6cabb4041c1197881d9f5e9ea8293ece2d409356ccf56d4a8948743b49b13ca
16
17 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
18 PKG_LICENSE:=GPL-3.0-or-later
19 PKG_LICENSE_FILES:=LICENSE.txt
20
21 PKG_BUILD_PARALLEL:=1
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_OPUS:libopusfile \
40 +SQUEEZELITE_SSL:libopenssl \
41 +SQUEEZELITE_WMA:libffmpeg-audio-dec
42 VARIANT:=full
43 endef
44
45 define Package/squeezelite-mini
46 $(call Package/squeezelite/default)
47 TITLE+= (minimal)
48 VARIANT:=mini
49 endef
50
51 define Package/squeezelite/config/default
52
53 config SQUEEZELITE_WMA
54 bool "WMA/ALAC decode support"
55 depends on BUILD_PATENTED
56 help
57 Include WMA and ALAC decoding using ffmpeg
58 default n
59
60 config SQUEEZELITE_RESAMPLE
61 bool "Resample support"
62 help
63 Include support for resampling using libsoxr
64 default n
65
66 config SQUEEZELITE_DSD
67 bool "DSD playback over PCM (DoP)"
68 help
69 Include support for DSD over PCM for compatible DAC
70 default n
71
72 config SQUEEZELITE_SSL
73 bool "SSL/TLS support"
74 help
75 Include SSL/TLS support for use with e.g. https media URLs
76 default n
77
78 config SQUEEZELITE_OPUS
79 bool "Opus codec support"
80 help
81 Include Opus codec support
82 default n
83 endef
84
85 define Package/squeezelite-full/config
86 if PACKAGE_squeezelite-full
87 $(call Package/squeezelite/config/default)
88 endif
89 endef
90
91 define Package/squeezelite-mini/config
92 if PACKAGE_squeezelite-mini
93 $(call Package/squeezelite/config/default)
94 endif
95 endef
96
97 define Package/squeezelite/description/default
98 Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
99 It is aimed at supporting high quality audio at multiple sample rates including
100 44.1/48/88.2/96/176.4/192k/352.8/384kHz
101 Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg), opus (optional)
102 Native support for PCM builtin
103 Optional support of DSD playback via PCM for DoP capable DAC
104 Optional resampling to match sound device
105 endef
106
107 define Package/squeezelite-full/description
108 $(call Package/squeezelite/description/default)
109
110 This package has all the audio codecs compiled in.
111 endef
112
113 define Package/squeezelite-mini/description
114 $(call Package/squeezelite/description/default)
115
116 This package will dynamically load installed codecs.
117 endef
118
119 opts+= -DNO_MAD
120
121 ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
122 opts+= -DFFMPEG
123 endif
124
125 ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
126 opts+= -DDSD
127 endif
128
129 ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
130 opts+= -DRESAMPLE
131 endif
132
133 ifeq ($(CONFIG_SQUEEZELITE_SSL),y)
134 opts+= -DUSE_SSL
135 endif
136
137 ifeq ($(CONFIG_SQUEEZELITE_OPUS),y)
138 opts+= -DOPUS
139 TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/opus
140 endif
141
142 ifeq ($(BUILD_VARIANT),full)
143 opts+= -DLINKALL
144 endif
145
146 MAKE_FLAGS+=OPTS="$(opts)"
147
148 define Package/squeezelite/conffiles
149 /etc/config/squeezelite
150 endef
151
152 Package/squeezelite-mini/conffiles = $(Package/squeezelite/conffiles)
153 Package/squeezelite-full/conffiles = $(Package/squeezelite/conffiles)
154
155 define Package/squeezelite/install
156 $(INSTALL_DIR) $(1)/usr/bin
157 $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
158 $(INSTALL_DIR) $(1)/etc/init.d
159 $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
160 $(INSTALL_DIR) $(1)/etc/config
161 $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
162 endef
163
164 Package/squeezelite-mini/install=$(Package/squeezelite/install)
165 Package/squeezelite-full/install=$(Package/squeezelite/install)
166
167 $(eval $(call BuildPackage,squeezelite-mini))
168 $(eval $(call BuildPackage,squeezelite-full))