Merge pull request #5681 from neheb/sispmctl
[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 $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon-opt,--disable-neon-opt) \
103 --with-system-user=pulse \
104 --with-system-group=pulse \
105 --with-access-group=audio \
106 --with-database=simple \
107 --enable-alsa \
108 --disable-hal \
109 --disable-gconf \
110 --disable-nls \
111 --disable-manpages \
112 --enable-oss-output \
113 --disable-oss-wrapper \
114 --disable-samplerate \
115 --disable-per-user-esound-socket \
116 --disable-solaris \
117 --disable-gtk2 \
118 --disable-glib2 \
119 --disable-jack \
120 --disable-asyncns \
121 --disable-lirc \
122 --disable-udev \
123 --without-fftw \
124 --without-soxr \
125 --without-speex
126 # --disable-bluez
127
128 ifeq ($(BUILD_VARIANT),avahi)
129 CONFIGURE_ARGS += \
130 --enable-avahi \
131 --enable-dbus
132 endif
133
134 ifeq ($(BUILD_VARIANT),noavahi)
135 CONFIGURE_ARGS += \
136 --disable-avahi \
137 --disable-dbus
138 endif
139
140 CONFIGURE_VARS += \
141 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
142
143 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
144 TARGET_CFLAGS += -std=gnu99
145
146 define Build/InstallDev
147 $(INSTALL_DIR) \
148 $(1)/usr/lib/pkgconfig \
149 $(1)/usr/include/pulse \
150 $(1)/usr/lib \
151 $(1)/usr/lib/pulseaudio
152 $(CP) \
153 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
154 $(1)/usr/include/pulse
155 $(CP) \
156 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
157 $(1)/usr/lib/pkgconfig
158 $(CP) \
159 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
160 $(1)/usr/lib/
161 $(CP) \
162 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
163 $(1)/usr/lib/pulseaudio/
164 endef
165
166 define Package/pulseaudio-daemon/install
167 $(INSTALL_DIR) \
168 $(1)/etc/pulse \
169 $(1)/etc/init.d \
170 $(1)/usr/bin \
171 $(1)/usr/lib \
172 $(1)/usr/lib/pulseaudio \
173 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
174
175 $(INSTALL_BIN) \
176 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
177 $(1)/usr/bin/pulseaudio
178
179 $(INSTALL_BIN) \
180 ./files/pulseaudio.init \
181 $(1)/etc/init.d/pulseaudio
182
183 $(INSTALL_DATA) \
184 $(PKG_INSTALL_DIR)/etc/pulse/* \
185 $(1)/etc/pulse
186
187 $(CP) \
188 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
189 $(1)/usr/lib/
190
191 $(CP) \
192 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
193 $(1)/usr/lib/pulseaudio/
194
195 $(CP) \
196 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
197 $(1)/usr/lib/
198
199 $(CP) \
200 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
201 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
202
203 endef
204
205 define Package/pulseaudio-daemon-avahi/install
206 $(INSTALL_DIR) \
207 $(1)/etc/pulse \
208 $(1)/etc/init.d \
209 $(1)/usr/bin \
210 $(1)/usr/lib \
211 $(1)/usr/lib/pulseaudio \
212 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
213 $(1)/etc/dbus-1/system.d
214
215 $(INSTALL_BIN) \
216 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
217 $(1)/usr/bin/pulseaudio
218
219 $(INSTALL_BIN) \
220 ./files/pulseaudio.init \
221 $(1)/etc/init.d/pulseaudio
222
223 $(INSTALL_DATA) \
224 $(PKG_INSTALL_DIR)/etc/pulse/* \
225 $(1)/etc/pulse
226
227 $(CP) \
228 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
229 $(1)/usr/lib/
230
231 $(CP) \
232 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
233 $(1)/usr/lib/pulseaudio/
234
235 $(CP) \
236 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
237 $(1)/usr/lib/
238
239 $(CP) \
240 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
241 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
242
243 $(INSTALL_DATA) \
244 $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
245 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
246 endef
247
248 define Package/pulseaudio-tools/install
249 $(INSTALL_DIR) \
250 $(1)/usr/bin
251
252 $(INSTALL_BIN) \
253 $(PKG_INSTALL_DIR)/usr/bin/pa* \
254 $(1)/usr/bin/
255 endef
256
257 define Package/pulseaudio-profiles/install
258 $(INSTALL_DIR) \
259 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
260 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
261
262 $(INSTALL_DATA) \
263 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
264 $(1)/usr/share/pulseaudio/alsa-mixer/paths
265
266 $(INSTALL_DATA) \
267 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
268 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
269 endef
270
271 $(eval $(call BuildPackage,pulseaudio-daemon))
272 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
273 $(eval $(call BuildPackage,pulseaudio-tools))
274 $(eval $(call BuildPackage,pulseaudio-profiles))