2 # Copyright (C) 2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
16 PKG_MD5SUM:=e5749151dbbaa7e928793f020bf1208b
18 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_BUILD_DEPENDS:=intltool/host
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/nls.mk
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
32 DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
33 +librt +alsa-lib +libjson $(ICONV_DEPENDS) $(INTL_DEPENDS) \
34 @!UCLIBC_VERSION_0_9_30_1 @!UCLIBC_VERSION_0_9_30_2 \
35 @!UCLIBC_VERSION_0_9_30_3
36 TITLE:=Network sound server
37 URL:=http://www.pulseaudio.org
40 define Package/pulseaudio-daemon
41 $(call Package/pulseaudio/Default)
45 define Package/pulseaudio-daemon-avahi
46 $(call Package/pulseaudio/Default)
47 DEPENDS+=+dbus +libavahi-client +avahi-daemon-dbus
52 define Package/pulseaudio/Default/description
53 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
56 define Package/pulseaudio-daemon/description
57 $(call Package/pulseaudio/Default/description)
60 define Package/pulseaudio-daemon-avahi/description
61 $(call Package/pulseaudio/Default/description)
62 This package is compiled against dbus and avahi.
65 define Package/pulseaudio-daemon/conffiles
66 /etc/pulse/client.conf
67 /etc/pulse/daemon.conf
72 define Package/pulseaudio-daemon-avahi/conffiles
73 /etc/pulse/client.conf
74 /etc/pulse/daemon.conf
79 define Package/pulseaudio-tools
82 DEPENDS:=+libsndfile @PACKAGE_pulseaudio-daemon||PACKAGE_pulseaudio-daemon-avahi #+libpulse
83 TITLE:=Tools for Pulseaudio
84 URL:=http://www.pulseaudio.org
88 define Package/pulseaudio-profiles
91 DEPENDS:=@PACKAGE_pulseaudio-daemon||PACKAGE_pulseaudio-daemon-avahi
92 TITLE:=Profiles for Pulseaudio
93 URL:=http://www.pulseaudio.org
97 --with-system-user=root \
98 --with-system-group=root \
99 --with-access-group=root \
100 --with-database=simple \
107 --disable-oss-output \
108 --disable-oss-wrapper \
109 --disable-samplerate \
110 --disable-per-user-esound-socket \
119 ifeq ($(BUILD_VARIANT),avahi)
124 ifeq ($(BUILD_VARIANT),noavahi)
131 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
133 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
134 TARGET_CFLAGS += -std=gnu99
136 define Build/InstallDev
138 $(1)/usr/lib/pkgconfig \
139 $(1)/usr/include/pulse \
142 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
143 $(1)/usr/include/pulse
145 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
146 $(1)/usr/lib/pkgconfig
148 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
152 define Package/pulseaudio-daemon/install
158 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
161 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
162 $(1)/usr/bin/pulseaudio
165 ./files/pulseaudio.init \
166 $(1)/etc/init.d/pulseaudio
169 $(PKG_INSTALL_DIR)/etc/pulse/* \
173 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
177 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
181 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
182 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
185 define Package/pulseaudio-daemon-avahi/install
191 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
192 $(1)/etc/dbus-1/system.d
195 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
196 $(1)/usr/bin/pulseaudio
199 ./files/pulseaudio.init \
200 $(1)/etc/init.d/pulseaudio
203 $(PKG_INSTALL_DIR)/etc/pulse/* \
207 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
211 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
215 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
216 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
219 $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
220 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
223 's/user="pulse"/user="root"/' \
224 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
227 define Package/pulseaudio-tools/install
232 $(PKG_INSTALL_DIR)/usr/bin/pa* \
236 define Package/pulseaudio-profiles/install
238 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
239 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
242 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
243 $(1)/usr/share/pulseaudio/alsa-mixer/paths
246 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
247 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
250 $(eval $(call BuildPackage,pulseaudio-daemon))
251 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
252 $(eval $(call BuildPackage,pulseaudio-tools))
253 $(eval $(call BuildPackage,pulseaudio-profiles))