Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 2fcc59d21915b1085a81d37bd76616ae > files > 2

sound-scripts-0.25-1mdk.src.rpm

# 	$Id: sound-scripts.spec,v 1.36 2005/03/30 17:29:11 tvignaud Exp $	
# EDIT IN CVS NOT IN SOURCE PACKAGE (NO PATCH ALLOWED).

# The following macro were stolen from initscripts spec file:
# The restart part in the real _post_service doesn't work with netfs and isn't needed
# for other scripts
%define _mypost_service() if [ $1 = 1 ]; then /sbin/chkconfig --add %{1}; fi;
%define initlvl_chg() if [[ -f /etc/rc3.d/S%{2}%{1} ]] && [[ -f /etc/rc5.d/S%{2}%{1} ]] && egrep -q 'chkconfig: [0-9]+ %{3}' /etc/init.d/%{1}; then chkconfig --add %{1} || : ; fi; \
%{nil}

Summary: The sound scripts
Name: sound-scripts
Version: 0.25
Release: 1mdk
License: GPL
Url: http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/
Group: System/Base
Source0: %name-%version.tar.bz2
BuildRoot: %_tmppath/%name-root
BuildArch: noarch
Requires: procps >= 2.0.7-8mdk, modutils >= 2.4.1
Prereq: chkconfig >= 1.3.8-3mdk, coreutils, /usr/bin/tr, grep, rpm-helper
Conflicts: initscripts <= 7.06-50mdk
Conflicts: alsa-utils < 1.0.6-2mdk
Conflicts: udev < 0.50-5mdk

%description
The sound-scripts package contains the basic system scripts used:
- to setup default sound mixer on first boot
- save sound mixer level on shutdown
- restore sound mixer on bootstrapping

%prep
%setup -q

%build
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc
%makeinstall_std

# there's no interesting string that is already gprintified
export DONT_GPRINTIFY=1


%post
%_mypost_service sound
%_mypost_service alsa

# only needed on upgrade
if [ $1 != 0 ]; then
	# Handle boot sequence changes on upgrade
	%initlvl_chg sound 71 18
	%initlvl_chg alsa 70 17
fi

%preun
%_preun_service sound
%_preun_service alsa

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc ChangeLog
%_bindir/reset_sound
%config(noreplace) /etc/rc.d/rc.alsa_default
%config(noreplace) /etc/sysconfig/alsa
%config(noreplace) /etc/rc.d/init.d/*
%dir /%{_sysconfdir}/dev.d/sound/
%config(noreplace) %attr(0755,root,root) /%{_sysconfdir}/dev.d/sound/*
%_datadir/alsa/


%changelog
* Wed Mar 30 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.25-1mdk
- fix sound on SB Audigy LS

* Fri Mar 25 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.24-1mdk
- fix alsa mixer restoring on boot (#14967)

* Tue Mar  8 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.23-1mdk
- move udev event handler (really fixing multiple cards support - #13103)

* Mon Mar  7 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.22-1mdk
- fix multiple card support (#13103)
- fix reseting sound volume on udev update

* Fri Mar  4 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.21-1mdk
- really fix #13911

* Mon Feb 28 2005  <tv@vador.mandrakesoft.com> 0.20-1mdk
- filter out error messages when USB subsystem is not availlable (#13977)
- fix distortion on SBLive Value with stereo analogue speakers (#13911)
- fix low sound on some laptops with internal HPs

* Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.19-1mdk
- better support for partially statically compiled ALSA

* Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.18-1mdk
- typo fix (#13504), thus really fixing #12731

* Wed Feb  9 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.17-1mdk
- alsa service: better check to know whether ALSA drivers are loaded
  or not (fix broken sound startup when a webcam is plugged, #12731)
- fix alsa mixer restore when not using udev

* Tue Feb  1 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.16-1mdk
- fix no PID of programs using alsa shown when stopping alsa (#13102)
- handle multiple sound cards (#13103)

* Wed Jan 19 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.15-1mdk
- alsa_default.pl:
  o fix broken blacklisting (broken since 0.09-1mdk)
  o fix sound on i845 with ALSA-1.0.8+
  o remute blacklisted entries if manually unmuted by the user
- udev event handler: save sound level on ALSA shutdown and on udev
  shutdown (eg: gently handle udev update so that the mixer doesn't
  suddendly got reseted to boot's defaults because the user hasn't
  save them)

* Wed Jan 12 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.14-1mdk
- fix alsactl path (#12986)

* Tue Jan 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.13-1mdk
- smooth startup when using udev (ALSA levels are now restored
  asynchronously)
- display FAILED if restoring mixer levels failed
- factorize ALSA mixer restoring into /etc/dev.d/snd/controlC0/alsa.dev

* Tue Jan  4 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.12-1mdk
- wait_for_sysfs is dead

* Sun Dec  5 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.11-1mdk
- use wait_for_sysfs in order to speed up starting time

* Fri Dec  3 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.10-1mdk
- fix udev check after switching from udev-030 to udev-046 (#12553)

* Thu Nov  4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.09-1mdk
- alsa_default.pl:
  o fix too fast sound on "Terratec Aureon 5.1 Sky" (#12100)
  o documment each blacklisted mixer element
  o generalize SB Live fix so that it works on Audigy too (both EMU10K
    and EMU10K2) (#7938)
- reset_sound: make it work for non root users too

* Tue Nov  2 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.08-1mdk
- be more robust when parsing asound.state (thus fixing support for
  the Turtle Beach Santa Cruz soundcard, which uses the Cirrus Logic
  CS4297A driver (#12151))

* Fri Oct  1 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.07-1mdk
- alsa service: load snd audio if needed (because snd-usb-audio is now
  blacklisted on early boot and reenable USB sound audio hotplugging
  (for later (un-)plugging) (#8004)
- fix loud sound on cmpci cards

* Fri Sep 10 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.06-1mdk
- enforce proper package ordering when updating from mdk10.0 + updates
- workaround udev slowly creating /dev/ nodes on module load (Luca Berra)
- when mixer elements were altered (aka on kernel switches), run
  reset_sound like we do on first boot

* Thu Sep  9 2004 Frederic Lepied <flepied@mandrakesoft.com> 0.05-1mdk
- noarch
- prereq rpm-helper
- use alsactl -F restore to be more safe

* Fri Jun  4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.04-1mdk
- add reset_sound in order to reinitialize sound level to the first
  boot one

* Fri Jun  4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.03-1mdk
- fix larsen on laptops with ALI chipsets

* Fri May 28 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.02-1mdk
- fix larsen on some DELL notebooks (with i8xx chipsets)

* Wed Mar 24 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.01-1mdk
- new package, splited from initscripts