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:=c43749838612f4860465e83ed62ca38e
18 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_BUILD_DEPENDS:=intltool/host
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/nls.mk
29 #TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into)
30 define Package/pulseaudio/Default
33 DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
34 +librt +alsa-lib +libjson +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
35 TITLE:=Network sound server
36 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
37 URL:=http://www.pulseaudio.org
41 define Package/pulseaudio-daemon
42 $(call Package/pulseaudio/Default)
46 define Package/pulseaudio-daemon-avahi
47 $(call Package/pulseaudio/Default)
48 DEPENDS+=+dbus +libavahi-client +avahi-daemon
53 define Package/pulseaudio/Default/description
54 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
57 define Package/pulseaudio-daemon/description
58 $(call Package/pulseaudio/Default/description)
61 define Package/pulseaudio-daemon-avahi/description
62 $(call Package/pulseaudio/Default/description)
63 This package is compiled against dbus and avahi.
66 define Package/pulseaudio-daemon/conffiles
67 /etc/pulse/client.conf
68 /etc/pulse/daemon.conf
73 define Package/pulseaudio-daemon-avahi/conffiles
74 /etc/pulse/client.conf
75 /etc/pulse/daemon.conf
80 define Package/pulseaudio-tools
83 DEPENDS:=+libsndfile pulseaudio
84 TITLE:=Tools for Pulseaudio
85 URL:=http://www.pulseaudio.org
89 define Package/pulseaudio-profiles
93 TITLE:=Profiles for Pulseaudio
94 URL:=http://www.pulseaudio.org
98 --with-system-user=pulse \
99 --with-system-group=pulse \
100 --with-access-group=audio \
101 --with-database=simple \
107 --enable-oss-output \
108 --disable-oss-wrapper \
109 --disable-samplerate \
110 --disable-per-user-esound-socket \
121 ifeq ($(BUILD_VARIANT),avahi)
127 ifeq ($(BUILD_VARIANT),noavahi)
134 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
136 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
137 TARGET_CFLAGS += -std=gnu99
139 define Build/InstallDev
141 $(1)/usr/lib/pkgconfig \
142 $(1)/usr/include/pulse \
144 $(1)/usr/lib/pulseaudio
146 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
147 $(1)/usr/include/pulse
149 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
150 $(1)/usr/lib/pkgconfig
152 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
155 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
156 $(1)/usr/lib/pulseaudio/
159 define Package/pulseaudio-daemon/install
165 $(1)/usr/lib/pulseaudio \
166 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
169 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
170 $(1)/usr/bin/pulseaudio
173 ./files/pulseaudio.init \
174 $(1)/etc/init.d/pulseaudio
177 $(PKG_INSTALL_DIR)/etc/pulse/* \
181 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
185 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
186 $(1)/usr/lib/pulseaudio/
189 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
193 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
194 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
196 chmod -R 0644 $(1)/etc/pulse/*
199 define Package/pulseaudio-daemon-avahi/install
205 $(1)/usr/lib/pulseaudio \
206 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
207 $(1)/etc/dbus-1/system.d
210 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
211 $(1)/usr/bin/pulseaudio
214 ./files/pulseaudio.init \
215 $(1)/etc/init.d/pulseaudio
218 $(PKG_INSTALL_DIR)/etc/pulse/* \
222 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
226 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
227 $(1)/usr/lib/pulseaudio/
230 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
234 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
235 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
238 $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
239 $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
241 chmod -R 0644 $(1)/etc/pulse/* $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
244 define Package/pulseaudio-tools/install
249 $(PKG_INSTALL_DIR)/usr/bin/pa* \
253 define Package/pulseaudio-profiles/install
255 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
256 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
259 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
260 $(1)/usr/share/pulseaudio/alsa-mixer/paths
263 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
264 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
267 $(eval $(call BuildPackage,pulseaudio-daemon))
268 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
269 $(eval $(call BuildPackage,pulseaudio-tools))
270 $(eval $(call BuildPackage,pulseaudio-profiles))