%define version 1.0.24.2 %define alibversion 1.0.24.1 %define beta 0 %if %beta %define fname %name-%{version}%beta %else %define fname %name-%{version} %endif %define _with_systemd 1 Summary: Advanced Linux Sound Architecture (ALSA) utilities Name: alsa-utils Version: %version %if %beta Release: %mkrel 0.%{beta}.2 %else Release: %mkrel 4 %endif Source: ftp://ftp.alsa-project.org/pub/utils/%fname.tar.bz2 License: GPLv2 Group: Sound Url: http://www.alsa-project.org BuildRequires: kernel-headers >= 2.4.0 BuildRequires: libalsa-devel >= %alibversion BuildRequires: ncurses-devel ncursesw-devel BuildRequires: xmlto Requires: %{_lib}alsa2 >= 2:%alibversion # dependancies for alsaconf: Requires: pciutils %description Advanced Linux Sound Architecture (ALSA) utilities. Modularized architecture with support for a large range of ISA and PCI cards. Fully compatible with OSS/Lite (kernel sound drivers), but contains many enhanced features. This is the utilities package, which allows you to manipulate ALSA settings. %package -n speaker-test Summary: ALSA test tool Group: Sound Requires: alsa-utils %description -n speaker-test speaker-test is a tool that enables one to test his head phones. %package -n alsaconf Summary: ALSA configuration tool Group: Sound Requires: alsa-utils whiptail cdialog %description -n alsaconf Alsaconf is a tool that enables one to configure his sound card with ALSA. It's often not not needed as %{_vendor} will autoconfigure sound cards. %prep %setup -q -n %fname %build %configure2_5x make all %install rm -rf $RPM_BUILD_ROOT %makeinstall_std mkdir_p="mkdir -p" # move alsactl in /sbin in order to reload mixer settings on bootstrapping: mkdir $RPM_BUILD_ROOT/sbin mv $RPM_BUILD_ROOT/{%_sbindir,sbin}/alsactl ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%_sbindir %find_lang alsaconf %find_lang alsa-utils cat alsa-utils.lang >> alsaconf.lang install -d %{buildroot}%{_localstatedir}/lib/alsa/ touch %{buildroot}%{_localstatedir}/lib/alsa/asound.state %if ! %_with_systemd # (ahmad) alsa-utils-1.0.24.2-2.mga1: don't install this udev rule yet it'll be # useful coupled with systemd, we don't have systemd yet; # ACK'ed by coling rm -f %{buildroot}/lib/udev/rules.d/90-alsa-restore.rules %endif %post if [ -s /etc/asound.state -a ! -s /var/lib/alsa/asound.state ] ; then mv /etc/asound.state /var/lib/alsa/asound.state fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc [A-Z][A-Z]* %if %_with_systemd /lib/udev/rules.d/90-alsa-restore.rules %endif %_bindir/[a-i]* %_sbindir/alsactl /sbin/alsactl %_mandir/man1/[a-i]* %_mandir/man7/alsactl_init.7* %_datadir/alsa/ %{_localstatedir}/lib/alsa/ %ghost %{_localstatedir}/lib/alsa/asound.state %files -n speaker-test %_bindir/speaker-test %_mandir/man1/speaker-test.* %_datadir/sounds/alsa/ %files -n alsaconf -f alsaconf.lang %_sbindir/alsaconf %_mandir/man8/alsaconf.* %lang(fr) %_mandir/fr/man8/alsaconf.*