fc6c9aadecd98172a17f95120a605a6658d84237
[feed/packages.git] / sound / pulseaudio / Makefile
1 #
2 # Copyright (C) 2011-2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pulseaudio
11 PKG_VERSION:=12.2
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
16 PKG_HASH:=809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055
17
18 PKG_LICENSE:=LGPL-2.1-or-later
19 PKG_LICENSE_FILES:=GPL LICENSE
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=1
24 PKG_BUILD_DEPENDS:=intltool/host glib2/host
25 PKG_USE_MIPS16:=0
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/pulseaudio/Default
31 SECTION:=sound
32 CATEGORY:=Sound
33 DEPENDS:=+libsndfile +libltdl +libpthread +librt +alsa-lib \
34 +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
35 TITLE:=Network sound server
36 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
37 URL:=http://www.pulseaudio.org
38 PROVIDES:=pulseaudio
39 USERID:=pulse=51:pulse=51
40 endef
41
42 define Package/pulseaudio-daemon
43 $(call Package/pulseaudio/Default)
44 VARIANT:=noavahi
45 endef
46
47 define Package/pulseaudio-daemon-avahi
48 $(call Package/pulseaudio/Default)
49 DEPENDS+=+dbus +libavahi-client +sbc
50 TITLE+= (avahi/bluez)
51 VARIANT:=avahi
52 endef
53
54 define Package/pulseaudio/Default/description
55 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
56 endef
57
58 define Package/pulseaudio-daemon/description
59 $(call Package/pulseaudio/Default/description)
60 endef
61
62 define Package/pulseaudio-daemon-avahi/description
63 $(call Package/pulseaudio/Default/description)
64 This package enables avahi,bluez and is compiled against dbus, sbc, and avahi.
65 endef
66
67 define Package/pulseaudio-daemon/conffiles
68 /etc/pulse/client.conf
69 /etc/pulse/daemon.conf
70 /etc/pulse/default.pa
71 /etc/pulse/system.pa
72 endef
73
74 define Package/pulseaudio-daemon-avahi/conffiles
75 /etc/pulse/client.conf
76 /etc/pulse/daemon.conf
77 /etc/pulse/default.pa
78 /etc/pulse/system.pa
79 endef
80
81 define Package/pulseaudio-tools
82 SECTION:=sound
83 CATEGORY:=Sound
84 DEPENDS:=+libsndfile pulseaudio
85 TITLE:=Tools for Pulseaudio
86 URL:=http://www.pulseaudio.org
87 VARIANT:=noavahi
88 endef
89
90 define Package/pulseaudio-profiles
91 SECTION:=sound
92 CATEGORY:=Sound
93 DEPENDS:=pulseaudio
94 TITLE:=Profiles for Pulseaudio
95 URL:=http://www.pulseaudio.org
96 endef
97
98 CONFIGURE_ARGS += \
99 $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon-opt,--disable-neon-opt) \
100 --with-system-user=pulse \
101 --with-system-group=pulse \
102 --with-access-group=audio \
103 --with-database=simple \
104 --enable-alsa \
105 --disable-hal \
106 --disable-gconf \
107 --disable-nls \
108 --disable-manpages \
109 --enable-oss-output \
110 --disable-oss-wrapper \
111 --disable-samplerate \
112 --disable-per-user-esound-socket \
113 --disable-solaris \
114 --disable-gtk2 \
115 --disable-glib2 \
116 --disable-jack \
117 --disable-asyncns \
118 --disable-lirc \
119 --disable-udev \
120 --without-fftw \
121 --without-soxr \
122 --without-speex
123
124 ifeq ($(BUILD_VARIANT),avahi)
125 CONFIGURE_ARGS += \
126 --enable-avahi \
127 --enable-dbus
128 endif
129
130 ifeq ($(BUILD_VARIANT),noavahi)
131 CONFIGURE_ARGS += \
132 --disable-avahi \
133 --disable-dbus
134 endif
135
136 CONFIGURE_VARS += \
137 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
138
139 define Build/InstallDev
140 $(INSTALL_DIR) \
141 $(1)/usr/lib/pkgconfig \
142 $(1)/usr/include/pulse \
143 $(1)/usr/lib \
144 $(1)/usr/lib/pulseaudio
145 $(CP) \
146 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
147 $(1)/usr/include/pulse
148 $(CP) \
149 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
150 $(1)/usr/lib/pkgconfig
151 $(CP) \
152 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
153 $(1)/usr/lib/
154 $(CP) \
155 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
156 $(1)/usr/lib/pulseaudio/
157 endef
158
159 define Package/pulseaudio-daemon/install
160 $(INSTALL_DIR) \
161 $(1)/etc/pulse \
162 $(1)/etc/init.d \
163 $(1)/usr/bin \
164 $(1)/usr/lib \
165 $(1)/usr/lib/pulseaudio \
166 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
167
168 $(INSTALL_BIN) \
169 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
170 $(1)/usr/bin/pulseaudio
171
172 $(INSTALL_BIN) \
173 ./files/pulseaudio.init \
174 $(1)/etc/init.d/pulseaudio
175
176 $(INSTALL_DATA) \
177 $(PKG_INSTALL_DIR)/etc/pulse/* \
178 $(1)/etc/pulse
179
180 $(CP) \
181 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
182 $(1)/usr/lib/
183
184 $(CP) \
185 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
186 $(1)/usr/lib/pulseaudio/
187
188 $(CP) \
189 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
190 $(1)/usr/lib/
191
192 $(CP) \
193 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
194 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
195
196 endef
197
198 define Package/pulseaudio-daemon-avahi/install
199 $(INSTALL_DIR) \
200 $(1)/etc/pulse \
201 $(1)/etc/init.d \
202 $(1)/usr/bin \
203 $(1)/usr/lib \
204 $(1)/usr/lib/pulseaudio \
205 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
206 $(1)/etc/dbus-1/system.d
207
208 $(INSTALL_BIN) \
209 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
210 $(1)/usr/bin/pulseaudio
211
212 $(INSTALL_BIN) \
213 ./files/pulseaudio.init \
214 $(1)/etc/init.d/pulseaudio
215
216 $(INSTALL_DATA) \
217 $(PKG_INSTALL_DIR)/etc/pulse/* \
218 $(1)/etc/pulse
219
220 $(CP) \
221 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
222 $(1)/usr/lib/
223
224 $(CP) \
225 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
226 $(1)/usr/lib/pulseaudio/
227
228 $(CP) \
229 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
230 $(1)/usr/lib/
231
232 $(CP) \
233 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
234 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
235
236 $(INSTALL_DATA) \
237 $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
238 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
239 endef
240
241 define Package/pulseaudio-tools/install
242 $(INSTALL_DIR) \
243 $(1)/usr/bin
244
245 $(INSTALL_BIN) \
246 $(PKG_INSTALL_DIR)/usr/bin/pa* \
247 $(1)/usr/bin/
248 endef
249
250 define Package/pulseaudio-profiles/install
251 $(INSTALL_DIR) \
252 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
253 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
254
255 $(INSTALL_DATA) \
256 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
257 $(1)/usr/share/pulseaudio/alsa-mixer/paths
258
259 $(INSTALL_DATA) \
260 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
261 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
262 endef
263
264 $(eval $(call BuildPackage,pulseaudio-daemon))
265 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
266 $(eval $(call BuildPackage,pulseaudio-tools))
267 $(eval $(call BuildPackage,pulseaudio-profiles))