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