commit pulseaudio for openSUSE:Factory
Hello community, here is the log from the commit of package pulseaudio for openSUSE:Factory checked in at Sun Aug 1 17:15:09 CEST 2010. -------- --- pulseaudio/pulseaudio.changes 2010-05-15 13:25:55.000000000 +0200 +++ /mounts/work_src_done/STABLE/pulseaudio/pulseaudio.changes 2010-07-20 18:43:00.000000000 +0200 @@ -1,0 +2,12 @@ +Tue Jul 20 18:41:58 CEST 2010 - tiwai@suse.de + +- set up sh/csh profiles instead of /etc/environment in + setup-pulseaudio script (bnc#623837) + +------------------------------------------------------------------- +Tue Jul 20 18:20:35 CEST 2010 - tiwai@suse.de + +- Add speechd setup to setup-pulseaudio (bnc#619859) +- Use grep -q for testing in setup-pulseaudio + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pulseaudio.spec ++++++ --- /var/tmp/diff_new_pack.NReqF2/_old 2010-08-01 17:14:40.000000000 +0200 +++ /var/tmp/diff_new_pack.NReqF2/_new 2010-08-01 17:14:40.000000000 +0200 @@ -22,7 +22,7 @@ Name: pulseaudio Summary: A Networked Sound Server Version: 0.9.21 -Release: 7 +Release: 12 License: GPLv2+ ; LGPLv2.1+ Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 ++++++ setup-pulseaudio ++++++ --- /var/tmp/diff_new_pack.NReqF2/_old 2010-08-01 17:14:40.000000000 +0200 +++ /var/tmp/diff_new_pack.NReqF2/_new 2010-08-01 17:14:40.000000000 +0200 @@ -25,24 +25,49 @@ fi } +PROFNAME=/etc/profile.d/pulseaudio.sh +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 + 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 + else + echo "setenv $1 $2" >> $CPROFNAME + fi +} + +delete_variable () { + if test -f $PROFNAME && + grep -q "export $1"= $PROFNAME; then + sed -ie "/export $1=.*/d" $PROFNAME + fi + if test -f $CPROFNAME && + grep -q "setenv $1 " $CPROFNAME; then + sed -ie "/setenv $1 .*/d" $CPROFNAME + fi +} + enable_phonon() { echo "Enabling PulseAudio for Phonon..." - perl -pi -e "s|PHONON_PULSEAUDIO_DISABLE=1||g;" /etc/environment + delete_variable PHONON_PULSEAUDIO_DISABLE } enable_alsa() { echo "Enabling PulseAudio for ALSA..." - if grep "ALSA_CONFIG_PATH" /etc/environment; then - echo "PulseAudio config for ALSA already in use" - else - echo "ALSA_CONFIG_PATH=/etc/alsa-pulse.conf" >> /etc/environment - fi + set_variable ALSA_CONFIG_PATH /etc/alsa-pulse.conf } enable_libao() { echo "Enabling PulseAudio for libao..." if test -f /etc/libao.conf; then - if grep "default_driver=pulse" /etc/libao.conf; then + if grep -q "default_driver=pulse" /etc/libao.conf; then echo "Default driver is pulse already in /etc/libao.conf" else echo "default_driver=pulse" >> /etc/libao.conf @@ -65,6 +90,17 @@ # FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf } +enable_speechd() { + echo "Enabling PulseAudio for speech dispatcher..." + if test -f /etc/speech-dispatcher/speechd.conf; then + if grep -q 'AudioOutputMethod' /etc/speech-dispatcher/speechd.conf; then + perl -pi -e "s|^.*AudioOutputMethod .*|AudioOutputMethod \"pulse\"|g;" /etc/speech-dispatcher/speechd.conf + else + echo "AudioOutputMethod \"pulse\"" >> /etc/speech-dispatcher/speechd.conf + fi + fi +} + enable_openal() { # nothing to do here. openal-soft is patched to prefer pulse but # it won't autostart the daemon. @@ -72,16 +108,12 @@ } enable_oss() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Enabling PulseAudio for OSS..." for app in $LIST_OF_OSS_APPS; do - if grep "alias $app=padsp $app" /etc/environment; then + if grep -q "alias $app='padsp $app'" $PROFNAME; then echo "Application $app already setup for PulseAudio" else - echo "alias $app=padsp $app" >> /etc/environment + echo "alias $app='padsp $app'" >> $PROFNAME fi done } @@ -89,24 +121,16 @@ enable_sdl() { echo "Enabling PulseAudio for SDL..." # For SDL, we just add an environment variable, so that apps use the PA audio driver - if grep SDL_AUDIODRIVER /etc/environment; then - echo "SDL already setup to use PulseAudio" - else - echo "SDL_AUDIODRIVER=pulse" >> /etc/environment - fi + set_variable SDL_AUDIODRIVER pulse } enable_timidity() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Enabling PulseAudio for Timidity..." # Use esound output for timidity - if grep "alias timidity=timidity -Oe" /etc/environment; then + if grep -q "alias timidity='timidity -Oe'" $PROFNAME; then echo "Timidity already setup for using PulseAudio" else - echo "alias timidity=timidity -Oe" >> /etc/environment + echo "alias timidity='timidity -Oe'" >> $PROFNAME fi } @@ -127,16 +151,12 @@ disable_alsa() { echo "Disabling PulseAudio for ALSA..." - perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment + delete_variable ALSA_CONFIG_PATH } disable_phonon() { echo "Disabling PulseAudio for Phonon..." - if grep "PHONON_PULSEAUDIO_DISABLE" /etc/environment; then - echo "PulseAudio config for Phonon already in use" - else - echo "PHONON_PULSEAUDIO_DISABLE=1" >> /etc/environment - fi + set_variable PHONON_PULSEAUDIO_DISABLE 1 } disable_libao() { @@ -153,6 +173,15 @@ fi } +disable_speechd() { + echo "Disabling PulseAudio for speech dispatcher..." + if test -f /etc/speech-dispatcher/speechd.conf; then + if grep -q 'AudioOutputMethod' /etc/speech-dispatcher/speechd.conf; then + perl -pi -e "s|^.*AudioOutputMethod .*|#AudioOutputMethod \"pulse\"|g;" /etc/speech-dispatcher/speechd.conf + fi + fi +} + disable_openal() { # nothing to do here. openal-soft is patched to prefer pulse but # it won't autostart the daemon. @@ -160,29 +189,19 @@ } disable_oss() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - for app in $LIST_OF_OSS_APPS; do - perl -pi -e "s|alias $app=padsp $app||g;" /etc/environment + perl -pi -e "s|alias $app='padsp $app'||g;" $PROFNAME done } disable_sdl() { echo "Disabling PulseAudio for SDL..." - if grep "SDL_AUDIODRIVER=pulse" /etc/environment; then - perl -pi -e "s|SDL_AUDIODRIVER=pulse||g;" /etc/environment - fi + delete_variable SDL_AUDIODRIVER } disable_timidity() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Disabling PulseAudio for Timidity..." - perl -pi -e "s|alias timidity=timidity -Oe||g;" /etc/environment + perl -pi -e "s|alias timidity='timidity -Oe'||g;" $PROFNAME } disable_xine() { @@ -214,6 +233,7 @@ enable_xine enable_autospawn enable_phonon + enable_speechd ;; --disable) check_root || exit @@ -228,6 +248,7 @@ disable_xine disable_autospawn disable_phonon + disable_speechd ;; --status) STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"` ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de