Accepting request 23807 from home:sreeves1:branches:multimedia:libs

Copy from home:sreeves1:branches:multimedia:libs/pulseaudio via accept of submit request 23807 revision 2.
Request was accepted with message:
reviewed ok.

OBS-URL: https://build.opensuse.org/request/show/23807
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=28
This commit is contained in:
Takashi Iwai 2009-11-05 17:23:10 +00:00 committed by Git OBS Bridge
parent 5f9567af59
commit 7b3ee47cad
3 changed files with 45 additions and 21 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Nov 3 20:06:20 UTC 2009 - sreeves@novell.com
- Fix mplayer section of setup-pulseaudio. bnc#547384
-------------------------------------------------------------------
Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de
- clean up and fix setup-pulseaudio to not corrupt /etc/environment
(bnc#547384)
-------------------------------------------------------------------
Tue Oct 6 19:10:19 UTC 2009 - sreeves@novell.com

View File

@ -22,7 +22,7 @@
Name: pulseaudio
Summary: A Networked Sound Server
Version: 0.9.19
Release: 1
Release: 2
License: LGPL v2.1 or later
Group: System/Sound Daemons
Source: %{name}-%{version}.tar.bz2

View File

@ -5,12 +5,13 @@ LIST_OF_OSS_APPS="aumix sox"
show_help() {
echo "setup-pulseaudio [ --enable | --disable | --status ]"
echo ""
echo "Sets up PulseAudio configuration for all sound-based applications"
echo "Modifies configuration files of some applications for PulseAudio"
echo " --enable Enables PulseAudio"
echo " --disable Disables PulseAudio"
echo " --status Shows activation state (disabled or enabled) for PulseAudio"
echo ""
echo "You need to be root for this command to succeed"
echo "You may need to re-login for changes to take effect"
exit
}
@ -48,27 +49,28 @@ enable_libao() {
enable_mplayer() {
echo "Enabling PulseAudio for mplayer..."
# Maybe it would be better to just add a alias mplayer=mplayer -ao pulse to /etc/environment?
if test -f /etc/mplayer/mplayer.conf; then
if grep "ao=pulse" /etc/mplayer/mplayer.conf; then
echo "Default driver is pulse already in /etc/mplayer/mplayer.conf"
if grep -q '^ao=' /etc/mplayer/mplayer.conf; then
perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/mplayer/mplayer.conf
else
echo ""
echo "ao=pulse" >> /etc/mplayer/mplayer.conf
fi
else
echo "ao=pulse" >> /etc/mplayer/mplayer.conf
fi
# FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf
}
enable_openal() {
echo "Enabling PulseAudio for openal..."
# FIXME: openal uses ~/.openalrc
echo ""
# nothing to do here. openal-soft is patched to prefer pulse but
# it won't autostart the daemon.
return 0
}
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
@ -90,6 +92,10 @@ enable_sdl() {
}
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
@ -100,9 +106,9 @@ enable_timidity() {
}
enable_xine() {
echo "Enabling PulseAudio for Xine..."
#echo "Enabling PulseAudio for Xine..."
# FIXME: xine uses $HOME/.xine/config
echo ""
return 0
}
enable_autospawn() {
@ -120,27 +126,30 @@ disable_alsa() {
}
disable_libao() {
echo "Disabling PulseAudio for libao..."
if test -f /etc/libao.conf; then
echo "Disabling PulseAudio for libao..."
perl -pi -e "s|default_driver=pulse||g;" /etc/libao.conf
fi
}
disable_mplayer() {
echo "Disabling PulseAudio for mplayer..."
if test -f /etc/mplayer/mplayer.conf; then
echo "Disabling PulseAudio for mplayer..."
perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf
fi
}
disable_openal() {
echo "Disabling PulseAudio for openal..."
# FIXME: openal uses ~/.openalrc
echo ""
# nothing to do here. openal-soft is patched to prefer pulse but
# it won't autostart the daemon.
return 0
}
disable_oss() {
echo "Disabling PulseAudio for 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
done
@ -154,14 +163,18 @@ disable_sdl() {
}
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
}
disable_xine() {
echo "Disabling PulseAudio for Xine..."
#echo "Disabling PulseAudio for Xine..."
# FIXME: xine uses $HOME/.xine/config
echo ""
return 0
}
disable_autospawn() {