%define version 1.0.23 %define alibversion %version %define beta 0 %if %beta %define fname %name-%{version}%beta %else %define fname %name-%{version} %endif %define _with_systemd 0 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 Patch0001: 0001-alsactl-systemd-and-udev-hookup.patch Patch0002: 0002-alsactl-Move-asound.state-location-to-var-lib-alsa.patch Patch0003: 0003-configure.in-Fix-variable-name.patch Patch0004: 0004-alsactl-Add-a-with-udev-rules-dir-configure-option.patch License: GPL BuildRoot: %_tmppath/%name-buildroot 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: alsa-lib >= 1:%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 mandriva linux will autoconfigure sound cards. %prep %setup -q -n %fname %if %{_with_systemd} %apply_patches %endif %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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc [A-Z][A-Z]* %_bindir/[a-i]* %_sbindir/alsactl /sbin/alsactl %_mandir/man1/[a-i]* %_mandir/man7/alsactl_init.7* %_datadir/alsa/ %if %{_with_systemd} /lib/systemd/system/*.service /lib/systemd/system/*/*.service /lib/udev/rules.d/*.rules %endif %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.*