diff --git a/pulseaudio.changes b/pulseaudio.changes index 1ee5b10..eabfc1e 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 12 09:55:04 CEST 2010 - tiwai@suse.de + +- minor fixes for setup-pulseaudio (bnc#623837) + also added /etc/profile.d/pulseaudio.* to file list as ghost + ------------------------------------------------------------------- Tue Jul 20 18:41:58 CEST 2010 - tiwai@suse.de diff --git a/pulseaudio.spec b/pulseaudio.spec index e43b2b4..42d1e98 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -22,7 +22,7 @@ Name: pulseaudio Summary: A Networked Sound Server Version: 0.9.21 -Release: 12 +Release: 13 License: GPLv2+ ; LGPLv2.1+ Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 @@ -394,6 +394,9 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a %find_lang %{name} install %SOURCE2 $RPM_BUILD_ROOT%{_bindir} chmod 755 $RPM_BUILD_ROOT%{_bindir}/setup-pulseaudio +mkdir -p $RPM_BUILD_ROOT/etc/profile.d +touch $RPM_BUILD_ROOT/etc/profile.d/pulseaudio.sh +touch $RPM_BUILD_ROOT/etc/profile.d/pulseaudio.csh mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/gdm/.pulse cp $RPM_SOURCE_DIR/default.pa-for-gdm $RPM_BUILD_ROOT%{_localstatedir}/lib/gdm/.pulse/default.pa ln -s esdcompat $RPM_BUILD_ROOT%{_bindir}/esd @@ -433,6 +436,9 @@ groupadd -r pulse-access &>/dev/null || : %config(noreplace) %{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf %{_bindir}/pulseaudio %{_bindir}/setup-pulseaudio +# created by setup-pulseaudio script +%ghost /etc/profile.d/pulseaudio.sh +%ghost /etc/profile.d/pulseaudio.csh %dir %{_libdir}/pulse-%{drvver}/ %dir %{_libdir}/pulse-%{drvver}/modules/ %{_libdir}/libpulsecore-%{drvver}.so diff --git a/setup-pulseaudio b/setup-pulseaudio index ff5c908..04c7e0b 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -31,13 +31,13 @@ CPROFNAME=/etc/profile.d/pulseaudio.csh set_variable () { if test -f $PROFNAME && grep -q "export $1"= $PROFNAME; then - sed -ie "s|export $1=.*|export $1=$2|g" $PROFNAME + sed -i -e "s|export $1=.*|export $1=$2|g" $PROFNAME else echo "export $1=$2" >> $PROFNAME fi if test -f $CPROFNAME && grep -q "setenv $1 " $CPROFNAME; then - sed -ie "s|setenv $1 .*|setenv $1 $2|g" $CPROFNAME + sed -i -e "s|setenv $1 .*|setenv $1 $2|g" $CPROFNAME else echo "setenv $1 $2" >> $CPROFNAME fi @@ -46,11 +46,11 @@ set_variable () { delete_variable () { if test -f $PROFNAME && grep -q "export $1"= $PROFNAME; then - sed -ie "/export $1=.*/d" $PROFNAME + sed -i -e "/export $1=.*/d" $PROFNAME fi if test -f $CPROFNAME && grep -q "setenv $1 " $CPROFNAME; then - sed -ie "/setenv $1 .*/d" $CPROFNAME + sed -i -e "/setenv $1 .*/d" $CPROFNAME fi } @@ -251,8 +251,10 @@ case $1 in disable_speechd ;; --status) - STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"` - if [ "x$STATUS" = "xyes" ]; then + if [ -f /etc/sysconfig/sound ]; then + . /etc/sysconfig/sound + fi + if [ "x$PULSEAUDIO_ENABLE" = "xyes" ]; then echo "enabled" else echo "disabled"