audio/pulseaudio: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2014-10-13 06:19:44 +07:00 committed by Willy Sudiarto Raharjo
parent 46a410d0f6
commit 3bca4d2b63
3 changed files with 29 additions and 20 deletions

View file

@ -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.

View file

@ -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

View file

@ -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