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