diff options
author | Christoph Willing <chris.willing@iinet.net.au> | 2014-10-13 06:19:44 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-10-13 06:19:44 +0700 |
commit | 3bca4d2b63c8b80833a161acd98087aa701c71ce (patch) | |
tree | 3e19fe20d5edbd67d2fe5459b5e2fe18b4183f30 /audio | |
parent | 46a410d0f6d63b6e29d27965c5cf7248f7b068a4 (diff) |
audio/pulseaudio: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/pulseaudio/README | 26 | ||||
-rw-r--r-- | audio/pulseaudio/doinst.sh | 3 | ||||
-rw-r--r-- | audio/pulseaudio/pulseaudio.SlackBuild | 20 |
3 files changed, 29 insertions, 20 deletions
diff --git a/audio/pulseaudio/README b/audio/pulseaudio/README index 7c0de995fcc06..0231c2f07b8c9 100644 --- a/audio/pulseaudio/README +++ b/audio/pulseaudio/README @@ -2,9 +2,25 @@ pulseaudio is a networked sound server for Unix-like operating systems and Microsoft Windows. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (ESOUND). -Pulseaudio will need a pulse group/user to run. You can add one with - # groupadd -g 216 pulse - # useradd -u 216 -g pulse -d /var/lib/pulse pulse -See http://slackbuilds.org/uid_gid.txt for details on the uid/gid assignments. - Optional deps: jack-audio-connection-kit, avahi, lirc, libasyncns, orc + +USAGE: +In almost all cases, pulseaudio should be run as a normal user daemon +i.e. NOT a system wide daemon. It will be usually started by the desktop +environment (KDE, XFCE, MATE) when the user logs in. In general, there is +nothing more the user needs to do (configuration for particular devices or +circumstances notwithstanding). + +If necessary, pulseaudio may be started manually with: + /usr/bin/start-pulseaudio-x11 +or + /usr/bin/start-pulseaudio-kde + +In the EXTREMELY RARE case that pulseaudio needs to run as a system wide +daemon, the /etc/rc.d/rc.pulseaudio script is provided. It is not used at all +in the usual case, as above, in which pulseaudio runs as a normal user daemon. +Additionally, in the system wide daemon mode only, pulseaudio will need a +pulse group/user to run as. This may be done with: + groupadd -g 216 pulse + useradd -u 216 -g pulse -d /var/run/pulse -m pulse +See http://slackbuilds.org/uid_gid.txt for details on the uid/gid assignments. diff --git a/audio/pulseaudio/doinst.sh b/audio/pulseaudio/doinst.sh index 4d34b37081caa..b41e0cf7e84a8 100644 --- a/audio/pulseaudio/doinst.sh +++ b/audio/pulseaudio/doinst.sh @@ -21,6 +21,7 @@ preserve_perms() { config $NEW } config etc/pulse/client.conf.new -config etc/pulse/default.pa.new config etc/pulse/daemon.conf.new +config etc/pulse/default.pa.new +config etc/pulse/system.pa.new preserve_perms etc/rc.d/rc.pulseaudio.new diff --git a/audio/pulseaudio/pulseaudio.SlackBuild b/audio/pulseaudio/pulseaudio.SlackBuild index c7924bbcce637..a81e299cbd7bf 100644 --- a/audio/pulseaudio/pulseaudio.SlackBuild +++ b/audio/pulseaudio/pulseaudio.SlackBuild @@ -7,7 +7,7 @@ PRGNAM=pulseaudio VERSION=${VERSION:-5.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -37,16 +37,6 @@ else LIBDIRSUFFIX="" fi -if ! grep -q ^pulse: /etc/group ; then - echo " Must have a pulse group to run this script." - echo " # groupadd -g 216 pulse" - exit 1 -elif ! grep -q ^pulse: /etc/passwd ; then - echo " Must have a pulse user to run this script." - echo " # useradd -g pulse -u 216 -d /var/lib/pulse pulse" - exit 1 -fi - set -eu rm -rf $PKG @@ -55,6 +45,10 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION +sed -i -e '/@PA_BINARY@/ imkdir -p \$HOME/.config/pulse' src/daemon/start-pulseaudio-x11.in +sed -i -e '/@PA_BINARY@/ imkdir -p \$HOME/.config/pulse' src/daemon/start-pulseaudio-kde.in +echo "X-MATE-Autostart-Phase=Initialization" >>src/daemon/pulseaudio.desktop.in + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -89,9 +83,7 @@ make check make -j1 make install-strip DESTDIR=$PKG -mv $PKG/etc/pulse/client.conf $PKG/etc/pulse/client.conf.new -mv $PKG/etc/pulse/default.pa $PKG/etc/pulse/default.pa.new -mv $PKG/etc/pulse/daemon.conf $PKG/etc/pulse/daemon.conf.new +for f in $( find $PKG/etc/pulse/ -type f ) ; do mv $f $f.new ; done mkdir -p $PKG/etc/rc.d cp $CWD/rc.pulseaudio $PKG/etc/rc.d/rc.pulseaudio.new |