Accepting request 21254 from home:llunak:branches:multimedia:libs

Copy from home:llunak:branches:multimedia:libs/pulseaudio via accept of submit request 21254 revision 2.
Request was accepted with message:
thanks

OBS-URL: https://build.opensuse.org/request/show/21254
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=23
This commit is contained in:
Pavol Rusnak 2009-10-01 14:54:18 +00:00 committed by Git OBS Bridge
parent 2f3b255389
commit 93d9ef22e4
4 changed files with 43 additions and 1 deletions

15
disabled-start.diff Normal file
View File

@ -0,0 +1,15 @@
--- src/daemon/start-pulseaudio-x11.in.sav 2009-06-08 00:35:57.000000000 +0200
+++ src/daemon/start-pulseaudio-x11.in 2009-09-28 19:33:07.388014651 +0200
@@ -19,6 +19,12 @@
set -e
+. /etc/sysconfig/sound
+
+if [ x"$PULSEAUDIO_ENABLE" = x"no" ] ; then
+ exit 1
+fi
+
[ -z "$PULSE_SERVER" ]
@PA_BINARY@ --start "$@"

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Sep 28 17:36:58 UTC 2009 - llunak@novell.com
- make 'setup-pulseaudio --disable' actually really disable PA (bnc#537780)
-------------------------------------------------------------------
Thu Sep 24 16:43:16 UTC 2009 - sreeves@novell.com

View File

@ -28,6 +28,7 @@ Group: System/Sound Daemons
Source: %{name}-%{version}.tar.bz2
Source1: default.pa-for-gdm
Source2: setup-pulseaudio
Patch1: disabled-start.diff
Url: http://pulseaudio.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: alsa-devel
@ -239,6 +240,7 @@ This package contains GDM integration hooks for the PulseAudio sound server.
%lang_package
%prep
%setup -q -T -b0
%patch1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"

View File

@ -105,6 +105,15 @@ enable_xine() {
echo ""
}
enable_autospawn() {
echo "Enabling PulseAudio autospawn..."
if grep -q ^autospawn /etc/pulse/client.conf; then
perl -pi -e "s|^autospawn.*|autospawn = yes|g;" /etc/pulse/client.conf
else
echo "autospawn = yes" >> /etc/pulse/client.conf
fi
}
disable_alsa() {
echo "Disabling PulseAudio for ALSA..."
perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment
@ -155,6 +164,15 @@ disable_xine() {
echo ""
}
disable_autospawn() {
echo "Disabling PulseAudio autospawn..."
if grep -q ^autospawn /etc/pulse/client.conf; then
perl -pi -e "s|^autospawn.*|autospawn = no|g;" /etc/pulse/client.conf
else
echo "autospawn = no" >> /etc/pulse/client.conf
fi
}
case $1 in
--enable)
check_root || exit
@ -167,6 +185,7 @@ case $1 in
enable_sdl
enable_timidity
enable_xine
enable_autospawn
;;
--disable)
check_root || exit
@ -179,6 +198,7 @@ case $1 in
disable_sdl
disable_timidity
disable_xine
disable_autospawn
;;
--status)
STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"`
@ -195,7 +215,7 @@ case $1 in
esac
# Now, update /etc/sysconfig/sound with the PA status
if grep PULSEAUDIO_ENABLE /etc/sysconfig/sound; then
if grep -q PULSEAUDIO_ENABLE /etc/sysconfig/sound; then
if [ "x$ENABLE" = "x1" ]; then
perl -pi -e "s|PULSEAUDIO_ENABLE=\"no\"|PULSEAUDIO_ENABLE=\"yes\"|g;" /etc/sysconfig/sound
else