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