1 |
%define name TiMidity++ |
2 |
%define version 2.13.2 |
3 |
%define release %mkrel 35 |
4 |
|
5 |
# Stick to /usr/lib/timidity on any platform |
6 |
# XXX probably better in /usr/share/timidity for arch independent data |
7 |
# but it's not worth splitting that much |
8 |
%define timiditydir %{_prefix}/lib/timidity |
9 |
|
10 |
# |
11 |
# When big change is involved (e.g. timidity.cfg change location), |
12 |
# so that new timidity binray and old patch RPM won't work together, |
13 |
# increment this number by 1 for all timidity related RPMs |
14 |
# |
15 |
%define patch_pkg_version 2 |
16 |
|
17 |
# |
18 |
# NOTE: When updating config for midia patch set, please refresh both |
19 |
# config file included here and the one in patch pkg |
20 |
# |
21 |
|
22 |
Summary: MIDI to WAVE converter and player |
23 |
Name: %{name} |
24 |
Version: %{version} |
25 |
Release: %{release} |
26 |
URL: http://timidity.sourceforge.net/ |
27 |
License: GPLv2+ |
28 |
Group: Sound/Midi |
29 |
Source0: %{name}-%{version}.tar.bz2 |
30 |
Source1: http://www.timidity.jp/dist/cfg/timidity.cfg |
31 |
Source2: timidity-emacs-mode.el |
32 |
Source3: timidity.README.mga |
33 |
Source11: %{name}48.png |
34 |
Source12: %{name}32.png |
35 |
Source13: %{name}16.png |
36 |
# (Abel) change default config path to /etc/timidity/timidity.cfg |
37 |
Patch0: timidity-2.13.2-default-config-path.patch |
38 |
# (Abel) it checked for speex.h, not speex/speex.h |
39 |
Patch1: timidity-2.13.2-speex-header-path.patch |
40 |
# (Abel) fix timidity path in .el file and install .el file when |
41 |
# enabling dynamic module |
42 |
Patch2: timidity-2.13.2-emacs.patch |
43 |
# (Abel) fix wishx path in tcl scripts |
44 |
Patch3: timidity-2.13.2-tcl.patch |
45 |
# (Abel) CVS fixes for 2.13.2 |
46 |
Patch4: timidity-2.13.2-cvs-fixes.patch |
47 |
Patch5: TiMidity++-2.13.2-gcc4.patch |
48 |
#(nl) CVS Fix Build against portaudio V19 |
49 |
Patch6: Timidity-fix-portaudioV19-build.diff |
50 |
Patch7: TiMidity++-2.13.2+flac-1.1.3-partial.patch |
51 |
Patch8: timidity-2.13.2-tcl-legacy.patch |
52 |
Patch9: timidity-2.13.2-wformat.patch |
53 |
Requires: timidity-instruments = %{patch_pkg_version} |
54 |
BuildRequires: alsa-lib-devel |
55 |
BuildRequires: autoconf |
56 |
BuildRequires: emacs-bin |
57 |
BuildRequires: gtk2-devel |
58 |
BuildRequires: jackit-devel |
59 |
BuildRequires: lesstif-devel |
60 |
BuildRequires: libao-devel |
61 |
BuildRequires: libflac-devel >= 1.1.3 |
62 |
BuildRequires: liboggflac-devel |
63 |
BuildRequires: ncurses-devel |
64 |
BuildRequires: oggvorbis-devel |
65 |
BuildRequires: portaudio-devel |
66 |
BuildRequires: speex-devel |
67 |
BuildRequires: tcl-devel |
68 |
BuildRequires: tk-devel |
69 |
BuildRequires: libxaw-devel |
70 |
BuildRequires: slang-devel |
71 |
|
72 |
BuildConflicts: Xaw3d-devel |
73 |
|
74 |
|
75 |
%description |
76 |
TiMidity is a MIDI to WAVE converter and player that uses Gravis |
77 |
Ultrasound(tm) or SoundFont(tm) patch files to generate digital audio data |
78 |
from general MIDI files. The audio data can be played through any |
79 |
sound device or stored on disk. |
80 |
|
81 |
%package interfaces-extra |
82 |
Summary: Extra GUI/text mode interfaces for TiMidity |
83 |
Group: Sound/Midi |
84 |
Requires: %{name} = %{version}-%{release} |
85 |
Requires: emacs-bin |
86 |
|
87 |
%description interfaces-extra |
88 |
TiMidity is a MIDI to WAVE converter and player that uses Gravis |
89 |
Ultrasound(tm) or SoundFont(tm) patch files to generate digital audio data |
90 |
from general MIDI files. The audio data can be played through any |
91 |
sound device or stored on disk. |
92 |
|
93 |
Install this if you want to use TiMidity under other interfaces, such as |
94 |
Motif(or Lesstif), Tcl/Tk, emacs etc. |
95 |
|
96 |
%prep |
97 |
%setup -q |
98 |
%patch0 -p1 -b .default-path |
99 |
%patch1 -p1 -b .speex-header |
100 |
%patch2 -p1 -b .emacs |
101 |
%patch3 -p1 |
102 |
%patch4 -p1 -b .cvs |
103 |
%patch5 -p1 -b .gcc4 |
104 |
%patch6 -p0 -b .portaudioV19 |
105 |
%patch7 -p1 -b .flac |
106 |
%patch8 -p0 -b .tcl_legacy |
107 |
%patch9 -p0 -b .wformat |
108 |
|
109 |
%build |
110 |
autoconf |
111 |
|
112 |
# little ugly trick to force install of tclIndex, running wish requires |
113 |
# X display |
114 |
touch interface/tclIndex |
115 |
|
116 |
|
117 |
export SHLDFLAGS=`echo '%{ldflags}'|sed -e 's/-Wl,--no-undefined//'` |
118 |
%configure2_5x \ |
119 |
--enable-audio=oss,alsa,portaudio,jack,ao,vorbis,flac,speex \ |
120 |
--enable-dynamic=dynamic,ncurses,slang,motif,tcltk,emacs,xaw,xskin,gtk \ |
121 |
--enable-interface=alsaseq \ |
122 |
--enable-network \ |
123 |
--enable-server |
124 |
|
125 |
%make LDFLAGS="-lFLAC" |
126 |
|
127 |
%install |
128 |
rm -rf %{buildroot} |
129 |
%makeinstall_std |
130 |
install -d %{buildroot}%{_datadir}/timidity |
131 |
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/timidity/timidity-custom.cfg |
132 |
|
133 |
install -d %{buildroot}%{_datadir}/applications |
134 |
cat <<EOF > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop |
135 |
[Desktop Entry] |
136 |
Name=TiMidity++ |
137 |
Comment=MIDI file player |
138 |
Exec=timidity -ig |
139 |
Icon=%{name} |
140 |
Terminal=false |
141 |
Type=Application |
142 |
StartupNotify=true |
143 |
Categories=Audio;Midi; |
144 |
EOF |
145 |
|
146 |
#icons |
147 |
install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png |
148 |
install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
149 |
install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
150 |
|
151 |
# emacs mode |
152 |
install -m644 %{SOURCE2} -D $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/timidity.el |
153 |
|
154 |
# japanese manpages |
155 |
install -m644 doc/ja_JP.eucJP/timidity.1 -D %{buildroot}%{_mandir}/ja/man1/timidity.1 |
156 |
install -m644 doc/ja_JP.eucJP/timidity.cfg.5 %{buildroot}%{_mandir}/ja/man1/timidity.cfg.5 |
157 |
|
158 |
%clean |
159 |
rm -rf %{buildroot} |
160 |
|
161 |
%postun |
162 |
if [ "$1" = "0" ]; then |
163 |
%{_sbindir}/update-alternatives --remove timidity.cfg %{_sysconfdir}/timidity/timidity-custom.cfg |
164 |
fi |
165 |
|
166 |
%triggerpostun -- %{name} <= 2.13.2-22 |
167 |
%{_sbindir}/update-alternatives --install %{_sysconfdir}/timidity/timidity.cfg timidity.cfg %{_sysconfdir}/timidity/timidity-custom.cfg 10 |
168 |
|
169 |
%files |
170 |
%doc AUTHORS ChangeLog INSTALL NEWS README doc/C/FAQ |
171 |
%doc doc/C/README.{alsaseq,dl,sf,m2m,mts} |
172 |
%config(noreplace) %{_sysconfdir}/timidity |
173 |
%{_bindir}/timidity |
174 |
%{_mandir}/man?/timidity* |
175 |
%lang(ja) %{_mandir}/ja/man?/* |
176 |
%{_datadir}/timidity |
177 |
%dir %{timiditydir} |
178 |
%{timiditydir}/interface_[gn].* |
179 |
%{_datadir}/applications/mageia-%{name}.desktop |
180 |
%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
181 |
%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
182 |
%{_iconsdir}/hicolor/48x48/apps/%{name}.png |
183 |
|
184 |
%files interfaces-extra |
185 |
%doc doc/C/README.{tk,xaw,xskin} |
186 |
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*.el |
187 |
%{timiditydir}/interface_[aeikms].* |
188 |
%{_datadir}/emacs/site-lisp/*.el |
189 |
%{timiditydir}/*.tcl |
190 |
%{timiditydir}/tclIndex |
191 |
%{timiditydir}/bitmaps |