1 |
%define version 1.0.24.2 |
2 |
%define alibversion 1.0.24.1 |
3 |
%define beta 0 |
4 |
%if %beta |
5 |
%define fname %name-%{version}%beta |
6 |
%else |
7 |
%define fname %name-%{version} |
8 |
%endif |
9 |
|
10 |
#define _with_systemd 0 |
11 |
|
12 |
Summary: Advanced Linux Sound Architecture (ALSA) utilities |
13 |
Name: alsa-utils |
14 |
Version: %version |
15 |
%if %beta |
16 |
Release: %mkrel 0.%{beta}.2 |
17 |
%else |
18 |
Release: %mkrel 2 |
19 |
%endif |
20 |
Source: ftp://ftp.alsa-project.org/pub/utils/%fname.tar.bz2 |
21 |
License: GPLv2 |
22 |
Group: Sound |
23 |
Url: http://www.alsa-project.org |
24 |
|
25 |
BuildRequires: kernel-headers >= 2.4.0 |
26 |
BuildRequires: libalsa-devel >= %alibversion |
27 |
BuildRequires: ncurses-devel ncursesw-devel |
28 |
BuildRequires: xmlto |
29 |
Requires: %{_lib}alsa2 >= 2:%alibversion |
30 |
# dependancies for alsaconf: |
31 |
Requires: pciutils |
32 |
|
33 |
%description |
34 |
Advanced Linux Sound Architecture (ALSA) utilities. Modularized architecture |
35 |
with support for a large range of ISA and PCI cards. Fully compatible with |
36 |
OSS/Lite (kernel sound drivers), but contains many enhanced features. |
37 |
|
38 |
This is the utilities package, which allows you to manipulate ALSA settings. |
39 |
|
40 |
%package -n speaker-test |
41 |
Summary: ALSA test tool |
42 |
Group: Sound |
43 |
Requires: alsa-utils |
44 |
|
45 |
%description -n speaker-test |
46 |
speaker-test is a tool that enables one to test his head phones. |
47 |
|
48 |
%package -n alsaconf |
49 |
Summary: ALSA configuration tool |
50 |
Group: Sound |
51 |
Requires: alsa-utils whiptail cdialog |
52 |
|
53 |
%description -n alsaconf |
54 |
Alsaconf is a tool that enables one to configure his sound card with ALSA. |
55 |
It's often not not needed as mandriva linux will autoconfigure sound cards. |
56 |
|
57 |
%prep |
58 |
%setup -q -n %fname |
59 |
|
60 |
%build |
61 |
%configure2_5x |
62 |
|
63 |
make all |
64 |
|
65 |
%install |
66 |
rm -rf $RPM_BUILD_ROOT |
67 |
%makeinstall_std mkdir_p="mkdir -p" |
68 |
|
69 |
# move alsactl in /sbin in order to reload mixer settings on bootstrapping: |
70 |
mkdir $RPM_BUILD_ROOT/sbin |
71 |
mv $RPM_BUILD_ROOT/{%_sbindir,sbin}/alsactl |
72 |
ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%_sbindir |
73 |
|
74 |
%find_lang alsaconf |
75 |
%find_lang alsa-utils |
76 |
cat alsa-utils.lang >> alsaconf.lang |
77 |
|
78 |
install -d %{buildroot}%{_localstatedir}/lib/alsa/ |
79 |
touch %{buildroot}%{_localstatedir}/lib/alsa/asound.state |
80 |
|
81 |
# (ahmad) alsa-utils-1.0.24.2-2.mga1: don't install this udev rule yet it'll be |
82 |
# useful coupled with systemd, we don't have systemd yet; |
83 |
# ACK'ed by coling |
84 |
rm -f %{buildroot}/lib/udev/rules.d/90-alsa-restore.rules |
85 |
|
86 |
%post |
87 |
if [ -s /etc/asound.state -a ! -s /var/lib/alsa/asound.state ] ; then |
88 |
mv /etc/asound.state /var/lib/alsa/asound.state |
89 |
fi |
90 |
|
91 |
%clean |
92 |
rm -rf $RPM_BUILD_ROOT |
93 |
|
94 |
%files |
95 |
%defattr(-,root,root) |
96 |
%doc [A-Z][A-Z]* |
97 |
%_bindir/[a-i]* |
98 |
%_sbindir/alsactl |
99 |
/sbin/alsactl |
100 |
%_mandir/man1/[a-i]* |
101 |
%_mandir/man7/alsactl_init.7* |
102 |
%_datadir/alsa/ |
103 |
%{_localstatedir}/lib/alsa/ |
104 |
%ghost %{_localstatedir}/lib/alsa/asound.state |
105 |
|
106 |
%files -n speaker-test |
107 |
%_bindir/speaker-test |
108 |
%_mandir/man1/speaker-test.* |
109 |
%_datadir/sounds/alsa/ |
110 |
|
111 |
%files -n alsaconf -f alsaconf.lang |
112 |
%_sbindir/alsaconf |
113 |
%_mandir/man8/alsaconf.* |
114 |
%lang(fr) %_mandir/fr/man8/alsaconf.* |