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.xz
15 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
16 PKG_MD5SUM:=33e85023259d530f0a763d5204e8bad9
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 +libopenssl +udev $(ICONV_DEPENDS) $(INTL_DEPENDS)
34 TITLE:=Network sound server
35 URL:=http://www.pulseaudio.org
39 define Package/pulseaudio-daemon
40 $(call Package/pulseaudio/Default)
44 define Package/pulseaudio-daemon-avahi
45 $(call Package/pulseaudio/Default)
46 DEPENDS+=+dbus +libavahi-client +avahi-daemon
51 define Package/pulseaudio/Default/description
52 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
55 define Package/pulseaudio-daemon/description
56 $(call Package/pulseaudio/Default/description)
59 define Package/pulseaudio-daemon-avahi/description
60 $(call Package/pulseaudio/Default/description)
61 This package is compiled against dbus and avahi.
64 define Package/pulseaudio-daemon/conffiles
65 /etc/pulse/client.conf
66 /etc/pulse/daemon.conf
71 define Package/pulseaudio-daemon-avahi/conffiles
72 /etc/pulse/client.conf
73 /etc/pulse/daemon.conf
78 define Package/pulseaudio-tools
81 DEPENDS:=+libsndfile pulseaudio
82 TITLE:=Tools for Pulseaudio
83 URL:=http://www.pulseaudio.org
87 define Package/pulseaudio-profiles
91 TITLE:=Profiles for Pulseaudio
92 URL:=http://www.pulseaudio.org
96 --with-system-user=pulse \
97 --with-system-group=pulse \
98 --with-access-group=audio \
99 --with-database=simple \
106 --enable-oss-output \
107 --disable-oss-wrapper \
108 --disable-samplerate \
109 --disable-per-user-esound-socket \
119 ifeq ($(BUILD_VARIANT),avahi)
125 ifeq ($(BUILD_VARIANT),noavahi)
132 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
134 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
135 TARGET_CFLAGS += -std=gnu99
137 define Build/InstallDev
139 $(1)/usr/lib/pkgconfig \
140 $(1)/usr/include/pulse \
143 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
144 $(1)/usr/include/pulse
146 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
147 $(1)/usr/lib/pkgconfig
149 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
153 define Package/pulseaudio-daemon/install
159 $(1)/usr/lib/pulseaudio \
160 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
163 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
164 $(1)/usr/bin/pulseaudio
167 ./files/pulseaudio.init \
168 $(1)/etc/init.d/pulseaudio
171 $(PKG_INSTALL_DIR)/etc/pulse/* \
175 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
179 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
180 $(1)/usr/lib/pulseaudio/
183 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
187 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
188 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
190 chmod -R 0644 $(1)/etc/pulse/*
193 define Package/pulseaudio-daemon-avahi/install
199 $(1)/usr/lib/pulseaudio \
200 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
201 $(1)/etc/dbus-1/system.d
204 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
205 $(1)/usr/bin/pulseaudio
208 ./files/pulseaudio.init \
209 $(1)/etc/init.d/pulseaudio
212 $(PKG_INSTALL_DIR)/etc/pulse/* \
216 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
220 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
221 $(1)/usr/lib/pulseaudio/
224 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
228 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
229 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
232 $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
233 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
235 chmod -R 0644 $(1)/etc/pulse/* $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
238 define Package/pulseaudio-tools/install
243 $(PKG_INSTALL_DIR)/usr/bin/pa* \
247 define Package/pulseaudio-profiles/install
249 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
250 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
253 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
254 $(1)/usr/share/pulseaudio/alsa-mixer/paths
257 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
258 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
261 $(eval $(call BuildPackage,pulseaudio-daemon))
262 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
263 $(eval $(call BuildPackage,pulseaudio-tools))
264 $(eval $(call BuildPackage,pulseaudio-profiles))