forked from pool/pulseaudio
Accepting request 43600 from home:tiwai:branches:multimedia:libs
Copy from home:tiwai:branches:multimedia:libs/pulseaudio via accept of submit request 43600 revision 3. Request was accepted with message: ok. OBS-URL: https://build.opensuse.org/request/show/43600 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=51
This commit is contained in:
parent
6e0cfb863e
commit
e74db0def4
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat May 15 11:07:54 UTC 2010 - coolo@novell.com
|
Sat May 15 11:07:54 UTC 2010 - coolo@novell.com
|
||||||
|
|
||||||
|
107
setup-pulseaudio
107
setup-pulseaudio
@ -25,24 +25,49 @@ check_root() {
|
|||||||
fi
|
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() {
|
enable_phonon() {
|
||||||
echo "Enabling PulseAudio for Phonon..."
|
echo "Enabling PulseAudio for Phonon..."
|
||||||
perl -pi -e "s|PHONON_PULSEAUDIO_DISABLE=1||g;" /etc/environment
|
delete_variable PHONON_PULSEAUDIO_DISABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_alsa() {
|
enable_alsa() {
|
||||||
echo "Enabling PulseAudio for ALSA..."
|
echo "Enabling PulseAudio for ALSA..."
|
||||||
if grep "ALSA_CONFIG_PATH" /etc/environment; then
|
set_variable ALSA_CONFIG_PATH /etc/alsa-pulse.conf
|
||||||
echo "PulseAudio config for ALSA already in use"
|
|
||||||
else
|
|
||||||
echo "ALSA_CONFIG_PATH=/etc/alsa-pulse.conf" >> /etc/environment
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_libao() {
|
enable_libao() {
|
||||||
echo "Enabling PulseAudio for libao..."
|
echo "Enabling PulseAudio for libao..."
|
||||||
if test -f /etc/libao.conf; then
|
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"
|
echo "Default driver is pulse already in /etc/libao.conf"
|
||||||
else
|
else
|
||||||
echo "default_driver=pulse" >> /etc/libao.conf
|
echo "default_driver=pulse" >> /etc/libao.conf
|
||||||
@ -65,6 +90,17 @@ enable_mplayer() {
|
|||||||
# FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf
|
# 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() {
|
enable_openal() {
|
||||||
# nothing to do here. openal-soft is patched to prefer pulse but
|
# nothing to do here. openal-soft is patched to prefer pulse but
|
||||||
# it won't autostart the daemon.
|
# it won't autostart the daemon.
|
||||||
@ -72,16 +108,12 @@ enable_openal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enable_oss() {
|
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..."
|
echo "Enabling PulseAudio for OSS..."
|
||||||
for app in $LIST_OF_OSS_APPS; do
|
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"
|
echo "Application $app already setup for PulseAudio"
|
||||||
else
|
else
|
||||||
echo "alias $app=padsp $app" >> /etc/environment
|
echo "alias $app='padsp $app'" >> $PROFNAME
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -89,24 +121,16 @@ enable_oss() {
|
|||||||
enable_sdl() {
|
enable_sdl() {
|
||||||
echo "Enabling PulseAudio for SDL..."
|
echo "Enabling PulseAudio for SDL..."
|
||||||
# For SDL, we just add an environment variable, so that apps use the PA audio driver
|
# For SDL, we just add an environment variable, so that apps use the PA audio driver
|
||||||
if grep SDL_AUDIODRIVER /etc/environment; then
|
set_variable SDL_AUDIODRIVER pulse
|
||||||
echo "SDL already setup to use PulseAudio"
|
|
||||||
else
|
|
||||||
echo "SDL_AUDIODRIVER=pulse" >> /etc/environment
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_timidity() {
|
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..."
|
echo "Enabling PulseAudio for Timidity..."
|
||||||
# Use esound output 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"
|
echo "Timidity already setup for using PulseAudio"
|
||||||
else
|
else
|
||||||
echo "alias timidity=timidity -Oe" >> /etc/environment
|
echo "alias timidity='timidity -Oe'" >> $PROFNAME
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,16 +151,12 @@ enable_autospawn() {
|
|||||||
|
|
||||||
disable_alsa() {
|
disable_alsa() {
|
||||||
echo "Disabling PulseAudio for 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() {
|
disable_phonon() {
|
||||||
echo "Disabling PulseAudio for Phonon..."
|
echo "Disabling PulseAudio for Phonon..."
|
||||||
if grep "PHONON_PULSEAUDIO_DISABLE" /etc/environment; then
|
set_variable PHONON_PULSEAUDIO_DISABLE 1
|
||||||
echo "PulseAudio config for Phonon already in use"
|
|
||||||
else
|
|
||||||
echo "PHONON_PULSEAUDIO_DISABLE=1" >> /etc/environment
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_libao() {
|
disable_libao() {
|
||||||
@ -153,6 +173,15 @@ disable_mplayer() {
|
|||||||
fi
|
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() {
|
disable_openal() {
|
||||||
# nothing to do here. openal-soft is patched to prefer pulse but
|
# nothing to do here. openal-soft is patched to prefer pulse but
|
||||||
# it won't autostart the daemon.
|
# it won't autostart the daemon.
|
||||||
@ -160,29 +189,19 @@ disable_openal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_oss() {
|
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
|
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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_sdl() {
|
disable_sdl() {
|
||||||
echo "Disabling PulseAudio for SDL..."
|
echo "Disabling PulseAudio for SDL..."
|
||||||
if grep "SDL_AUDIODRIVER=pulse" /etc/environment; then
|
delete_variable SDL_AUDIODRIVER
|
||||||
perl -pi -e "s|SDL_AUDIODRIVER=pulse||g;" /etc/environment
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_timidity() {
|
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..."
|
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() {
|
disable_xine() {
|
||||||
@ -214,6 +233,7 @@ case $1 in
|
|||||||
enable_xine
|
enable_xine
|
||||||
enable_autospawn
|
enable_autospawn
|
||||||
enable_phonon
|
enable_phonon
|
||||||
|
enable_speechd
|
||||||
;;
|
;;
|
||||||
--disable)
|
--disable)
|
||||||
check_root || exit
|
check_root || exit
|
||||||
@ -228,6 +248,7 @@ case $1 in
|
|||||||
disable_xine
|
disable_xine
|
||||||
disable_autospawn
|
disable_autospawn
|
||||||
disable_phonon
|
disable_phonon
|
||||||
|
disable_speechd
|
||||||
;;
|
;;
|
||||||
--status)
|
--status)
|
||||||
STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"`
|
STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user