1 |
%define version 1.0.23 |
2 |
%define alibversion %version |
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 4 |
19 |
%endif |
20 |
Source: ftp://ftp.alsa-project.org/pub/utils/%fname.tar.bz2 |
21 |
Patch0001: 0001-alsactl-systemd-and-udev-hookup.patch |
22 |
Patch0002: 0002-alsactl-Move-asound.state-location-to-var-lib-alsa.patch |
23 |
Patch0003: 0003-configure.in-Fix-variable-name.patch |
24 |
Patch0004: 0004-alsactl-Add-a-with-udev-rules-dir-configure-option.patch |
25 |
License: GPL |
26 |
BuildRoot: %_tmppath/%name-buildroot |
27 |
Group: Sound |
28 |
Url: http://www.alsa-project.org |
29 |
|
30 |
BuildRequires: kernel-headers >= 2.4.0 |
31 |
BuildRequires: libalsa-devel >= %alibversion |
32 |
BuildRequires: ncurses-devel ncursesw-devel |
33 |
BuildRequires: xmlto |
34 |
Requires: alsa-lib >= 1:%alibversion |
35 |
# dependancies for alsaconf: |
36 |
Requires: pciutils |
37 |
|
38 |
%description |
39 |
Advanced Linux Sound Architecture (ALSA) utilities. Modularized architecture |
40 |
with support for a large range of ISA and PCI cards. Fully compatible with |
41 |
OSS/Lite (kernel sound drivers), but contains many enhanced features. |
42 |
|
43 |
This is the utilities package, which allows you to manipulate ALSA settings. |
44 |
|
45 |
%package -n speaker-test |
46 |
Summary: ALSA test tool |
47 |
Group: Sound |
48 |
Requires: alsa-utils |
49 |
|
50 |
%description -n speaker-test |
51 |
speaker-test is a tool that enables one to test his head phones. |
52 |
|
53 |
%package -n alsaconf |
54 |
Summary: ALSA configuration tool |
55 |
Group: Sound |
56 |
Requires: alsa-utils whiptail cdialog |
57 |
|
58 |
%description -n alsaconf |
59 |
Alsaconf is a tool that enables one to configure his sound card with ALSA. |
60 |
It's often not not needed as mandriva linux will autoconfigure sound cards. |
61 |
|
62 |
%prep |
63 |
%setup -q -n %fname |
64 |
%if %{_with_systemd} |
65 |
%apply_patches |
66 |
%endif |
67 |
|
68 |
%build |
69 |
%configure2_5x |
70 |
make all |
71 |
|
72 |
%install |
73 |
rm -rf $RPM_BUILD_ROOT |
74 |
%makeinstall_std mkdir_p="mkdir -p" |
75 |
|
76 |
# move alsactl in /sbin in order to reload mixer settings on bootstrapping: |
77 |
mkdir $RPM_BUILD_ROOT/sbin |
78 |
mv $RPM_BUILD_ROOT/{%_sbindir,sbin}/alsactl |
79 |
ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%_sbindir |
80 |
|
81 |
%find_lang alsaconf |
82 |
%find_lang alsa-utils |
83 |
cat alsa-utils.lang >> alsaconf.lang |
84 |
|
85 |
%clean |
86 |
rm -rf $RPM_BUILD_ROOT |
87 |
|
88 |
%files |
89 |
%defattr(-,root,root) |
90 |
%doc [A-Z][A-Z]* |
91 |
%_bindir/[a-i]* |
92 |
%_sbindir/alsactl |
93 |
/sbin/alsactl |
94 |
%_mandir/man1/[a-i]* |
95 |
%_mandir/man7/alsactl_init.7* |
96 |
%_datadir/alsa/ |
97 |
%if %{_with_systemd} |
98 |
/lib/systemd/system/*.service |
99 |
/lib/systemd/system/*/*.service |
100 |
/lib/udev/rules.d/*.rules |
101 |
%endif |
102 |
|
103 |
%files -n speaker-test |
104 |
%_bindir/speaker-test |
105 |
%_mandir/man1/speaker-test.* |
106 |
%_datadir/sounds/alsa/ |
107 |
|
108 |
%files -n alsaconf -f alsaconf.lang |
109 |
%_sbindir/alsaconf |
110 |
%_mandir/man8/alsaconf.* |
111 |
%lang(fr) %_mandir/fr/man8/alsaconf.* |