source: packages/sound/pulseaudio/Makefile @ 28044

Last change on this file since 28044 was 28044, checked in by loswillios, 5 years ago

rework pulseaudio package:

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