1 |
%define name aumix |
2 |
%define version 2.8 |
3 |
%define release %mkrel 21 |
4 |
|
5 |
Name: %{name} |
6 |
Summary: A GTK+ / Ncurses audio mixer |
7 |
Version: %{version} |
8 |
Release: %{release} |
9 |
License: GPL |
10 |
Group: Sound |
11 |
BuildRequires: ncurses-devel |
12 |
BuildRequires: gtk+2-devel |
13 |
BuildRequires: autoconf |
14 |
BuildRequires: automake |
15 |
Source0: http://www.jpj.net/~trevor/aumix/%{name}-%{version}.tar.bz2 |
16 |
# mute(1) man page (from debian): |
17 |
Source1: aumix-mute.1.bz2 |
18 |
Patch1: aumix-2.8-utf8_vs_gtk2.patch |
19 |
Patch2: aumix-2.8-close-dialogs.patch |
20 |
Patch3: aumix-2.8-nb.patch |
21 |
# autoconf 2.5 and later support (from debian): |
22 |
Patch4: aumix-2.8-autoconf.patch |
23 |
Patch5: aumix-2.8-format_not_a_string_literal_and_no_format_arguments.diff |
24 |
# rawhide patches: |
25 |
Patch102: aumix-fix-cursor-color-on-exit.patch |
26 |
Patch103: aumix-2.8-fix-changing-level-non-interactively.patch |
27 |
Patch104: aumix-2.8-bug-115869.patch |
28 |
URL: http://www.jpj.net/~trevor/aumix.html |
29 |
Requires: initscripts >= 4.42 |
30 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
31 |
|
32 |
%description |
33 |
This is a program for adjusting audio mixers from the command line or scripts, |
34 |
or interactively at the console or a terminal with a full-screen, ncurses-based |
35 |
interface or a GTK-based X interface. |
36 |
|
37 |
%package text |
38 |
Summary: An Ncurses audio mixer |
39 |
License: GPL |
40 |
Group: Sound |
41 |
|
42 |
%description text |
43 |
This is a program for adjusting audio mixers from the command line or scripts, |
44 |
or interactively at the console or a terminal with a full-screen, ncurses-based |
45 |
interface . |
46 |
|
47 |
%prep |
48 |
%setup -q |
49 |
%patch1 -p1 -b .utf8 |
50 |
%patch2 -p0 -b .dialogs |
51 |
%patch3 -p1 -b .nb |
52 |
%patch4 -p1 -b .autoconf |
53 |
%patch5 -p0 |
54 |
%patch102 -p0 |
55 |
%patch103 -p1 |
56 |
%patch104 -p0 |
57 |
|
58 |
%build |
59 |
aclocal |
60 |
automake --add-missing |
61 |
autoconf |
62 |
mkdir build-text |
63 |
pushd build-text |
64 |
CONFIGURE_TOP=.. %configure --with-alsa --without-gtk1 --without-gtk |
65 |
%make |
66 |
popd |
67 |
mkdir build-gui |
68 |
pushd build-gui |
69 |
CONFIGURE_TOP=.. %configure --with-alsa --without-gtk1 |
70 |
%make |
71 |
popd |
72 |
|
73 |
%install |
74 |
rm -rf $RPM_BUILD_ROOT |
75 |
|
76 |
%makeinstall -C build-gui |
77 |
|
78 |
# install text version |
79 |
install -m755 build-text/src/aumix $RPM_BUILD_ROOT%{_bindir}/aumix-text |
80 |
|
81 |
# menu entry |
82 |
|
83 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications |
84 |
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF |
85 |
[Desktop Entry] |
86 |
Name=Aumix |
87 |
Comment=Basic volume controller |
88 |
Exec=%{name} |
89 |
Icon=sound_section |
90 |
Terminal=false |
91 |
Type=Application |
92 |
StartupNotify=true |
93 |
Categories=GTK;Audio;Mixer; |
94 |
EOF |
95 |
|
96 |
bzcat %SOURCE1 > $RPM_BUILD_ROOT%_mandir/man1/mute.1 |
97 |
|
98 |
%find_lang %name |
99 |
|
100 |
%if %mdkversion < 200900 |
101 |
%post |
102 |
%update_menus |
103 |
%endif |
104 |
|
105 |
%if %mdkversion < 200900 |
106 |
%postun |
107 |
%clean_menus |
108 |
%endif |
109 |
|
110 |
%clean |
111 |
rm -rf $RPM_BUILD_ROOT |
112 |
|
113 |
%files -f %{name}.lang |
114 |
%defattr(-,root,root) |
115 |
%doc README TODO NEWS ChangeLog |
116 |
%_bindir/aumix |
117 |
%_bindir/mute |
118 |
%_bindir/xaumix |
119 |
%_mandir/man1/* |
120 |
%_datadir/applications/mandriva-* |
121 |
%_datadir/%name |
122 |
|
123 |
%files text |
124 |
%defattr(-,root,root) |
125 |
%_bindir/aumix-text |
126 |
|
127 |
|