summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-17 15:38:20 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-17 15:38:20 +0000
commit2cf2758e3d6b93ae7f10b96680dadf5b7206eb9c (patch)
treef32002c741ed01a86fb7e3fe83ac07d951a1b381 /media-sound/pulseaudio
parentRevision bump to support new Java system. (diff)
downloadgentoo-2-2cf2758e3d6b93ae7f10b96680dadf5b7206eb9c.tar.gz
gentoo-2-2cf2758e3d6b93ae7f10b96680dadf5b7206eb9c.tar.bz2
gentoo-2-2cf2758e3d6b93ae7f10b96680dadf5b7206eb9c.zip
Improve support for system-wide pulseaudio daemon, let it work with users in audio group.
(Portage version: 2.1.1_pre3)
Diffstat (limited to 'media-sound/pulseaudio')
-rw-r--r--media-sound/pulseaudio/ChangeLog7
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.conf.d1
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.init.d8
-rw-r--r--media-sound/pulseaudio/pulseaudio-0.9.2.ebuild17
4 files changed, 29 insertions, 4 deletions
diff --git a/media-sound/pulseaudio/ChangeLog b/media-sound/pulseaudio/ChangeLog
index 554a329dfdf0..1a31e70e2367 100644
--- a/media-sound/pulseaudio/ChangeLog
+++ b/media-sound/pulseaudio/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-sound/pulseaudio
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.5 2006/07/16 23:33:00 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.6 2006/07/17 15:38:20 flameeyes Exp $
+
+ 17 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
+ files/pulseaudio.conf.d, files/pulseaudio.init.d, pulseaudio-0.9.2.ebuild:
+ Improve support for system-wide pulseaudio daemon, let it work with users in
+ audio group.
16 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
files/pulseaudio-0.9.2-fbsd.patch:
diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d
index 620443bfedf3..01521ede4aee 100644
--- a/media-sound/pulseaudio/files/pulseaudio.conf.d
+++ b/media-sound/pulseaudio/files/pulseaudio.conf.d
@@ -4,4 +4,3 @@
# Startup options
PA_OPTS="--log-target=syslog"
-
diff --git a/media-sound/pulseaudio/files/pulseaudio.init.d b/media-sound/pulseaudio/files/pulseaudio.init.d
index 66165fa2f556..08dbadfe2f57 100644
--- a/media-sound/pulseaudio/files/pulseaudio.init.d
+++ b/media-sound/pulseaudio/files/pulseaudio.init.d
@@ -9,8 +9,14 @@ depend() {
start() {
ebegin "Starting pulseaudio"
- start-stop-daemon --start --quiet --background --exec /usr/bin/pulseaudio -- ${PA_OPTS} --fail=true
+ HOME=/var/run/pulse
+ start-stop-daemon --start --chuid pulse:pulse \
+ --exec /usr/bin/pulseaudio -- ${PA_OPTS} --fail=true -D
eend $?
+
+ chgrp -R audio /var/run/pulse
+ chmod 0750 /var/run/pulse
+ chmod 0660 /var/run/pulse/native
}
stop() {
diff --git a/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild
index 4a564e3cda8c..227eb3d36ee1 100644
--- a/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild
+++ b/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild,v 1.3 2006/07/16 21:37:25 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild,v 1.4 2006/07/17 15:38:20 flameeyes Exp $
inherit eutils libtool autotools
@@ -39,6 +39,10 @@ pkg_setup() {
eerror "avahi, and then emerge polypaudio."
die "net-dns/avahi is missing the HOWL compatibility layer."
fi
+
+ enewgroup audio 18 # Just make sure it exists
+ enewgroup pulse
+ enewuser pulse -1 -1 /var/run/pulse pulse,audio
}
src_unpack() {
@@ -93,6 +97,17 @@ src_install() {
sed -e "s/@extradepend@/$extradepend/" "${FILESDIR}/pulseaudio.init.d" > "${T}/pulseaudio"
doinitd "${T}/pulseaudio"
+ # This section changes the configuration files so that they are ready for
+ # the system-wide pulseaudio daemon. The changes are:
+ # - use socket at /var/run/pulse/native
+ # - enable anonymous access (relies on filesystem-level access to the socket)
+ # - changes the dafault server path for the clients
+ sed -i -e '/load-module module-native-protocol-unix/s:$: auth-anonymous=1 socket=/var/run/pulse/native:' \
+ "${D}/etc/pulse/default.pa"
+ sed -i -e '/default-server/d' "${D}/etc/pulse/client.conf"
+ echo "default-server = unix:/var/run/pulse/native" >> \
+ "${D}/etc/pulse/client.conf"
+
dohtml -r doc
dodoc README doc/todo
}