]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without x # without X based interfaces (implies libX11 deps) | |
4 | %bcond_without alsa # without ALSA support | |
5 | %bcond_with arts # enable ARTS support (implies also glib(2) deps) | |
6 | %bcond_with esd # enable ESD support | |
7 | %bcond_with jack # enable JACK support | |
8 | %bcond_with nas # enable NAS support | |
9 | %bcond_with vorbis # enable Ogg Vorbis support | |
10 | # | |
11 | Summary: TiMidity++ - MIDI to WAV converter and player | |
12 | Summary(pl.UTF-8): TiMidity++ - konwerter do WAV oraz odtwarzacz plików MIDI | |
13 | Summary(pt_BR.UTF-8): Sintetizador MIDI por software | |
14 | Summary(ru.UTF-8): Проигрыватель MIDI файлов и конвертор их в WAV формат | |
15 | Summary(uk.UTF-8): Програвач MIDI-файлів та конвертор їх в WAV формат | |
16 | Name: TiMidity++ | |
17 | Version: 2.13.2 | |
18 | Release: 12 | |
19 | License: GPL | |
20 | Group: Applications/Sound | |
21 | Source0: http://dl.sourceforge.net/timidity/%{name}-%{version}.tar.bz2 | |
22 | # Source0-md5: a82ceeb2245e22f4de2b41da21eaee32 | |
23 | Source1: http://archive.cs.umbc.edu/pub/midia/instruments.tar.gz | |
24 | # Source1-md5: 4959787a78ee39d44a36185bd303cf20 | |
25 | Source2: britepno.pat.bz2 | |
26 | # Source2-md5: 324e265362f812883024b58cf3470d1a | |
27 | Source3: pistol.pat.bz2 | |
28 | # Source3-md5: f961325db679de6e0ea402ebe6a268f9 | |
29 | Source4: timidity.cfg | |
30 | Source5: timidity.init | |
31 | Source6: timidity.sysconfig | |
32 | Source7: timidity-modules-load.conf | |
33 | Source8: timidity.service | |
34 | Patch0: %{name}-detach.patch | |
35 | Patch1: %{name}-gcc4.patch | |
36 | Patch2: %{name}-configure.patch | |
37 | Patch3: %{name}-stop_polling.patch | |
38 | URL: http://timidity.sourceforge.net/ | |
39 | %{?with_alsa:BuildRequires: alsa-lib-devel} | |
40 | %{?with_arts:BuildRequires: arts-devel} | |
41 | BuildRequires: autoconf | |
42 | %{?with_esd:BuildRequires: esound-devel} | |
43 | %{?with_x:BuildRequires: gtk+-devel} | |
44 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} | |
45 | %{?with_vorbis:BuildRequires: libvorbis-devel} | |
46 | %{?with_x:BuildRequires: motif-devel} | |
47 | %{?with_nas:BuildRequires: nas-devel} | |
48 | BuildRequires: ncurses-devel | |
49 | BuildRequires: rpmbuild(macros) >= 1.626 | |
50 | BuildRequires: slang-devel >= 2.0.0 | |
51 | %{?with_x:BuildRequires: tk-devel >= 8.3.2} | |
52 | %{?with_x:Provides: %{name}(X) = %{version}-%{release}} | |
53 | Obsoletes: timidity | |
54 | Obsoletes: timidity++ | |
55 | Obsoletes: timidity++-X11 | |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | %description | |
59 | TiMidity++ is a converter that converts some of MIDI files ( formats : | |
60 | Standard MIDI file (MID), Recomposer files (RCP, R36, G18, G36) and | |
61 | Module file (mod) ) into formatted audio file (ex. RIFF WAVE). | |
62 | TiMidity uses Gravis Ultrasound-compatible patch files or Soundfonts | |
63 | (sfx, sf2) to generate digital audio data from MIDI files. The digital | |
64 | audio data generated by TiMidity can be stored in a file for | |
65 | processing, or played in real time through an audio device. In real | |
66 | time playing, TiMidity if able to show the lyric contained in KAR file | |
67 | or WRD file. | |
68 | ||
69 | %description -l pl.UTF-8 | |
70 | TiMidity++ jest konwerterem z niektórych plików MIDI (formaty: | |
71 | Standard MIDI (MID), Recomposer (RCP, R36, G18, G36), Module (mod)) do | |
72 | plików audio (np. RIFF WAVE). Do generowania danych z plików MIDI | |
73 | TiMidity używa patchy takich jak Gravis Ultrasound albo Soundfontów | |
74 | (sfx, sf2). Cyfrowe dane audio mogą być zapisane do pliku albo | |
75 | odtwarzane w czasie rzeczywistym. Przy odtwarzaniu TiMidity może | |
76 | pokazywać słowa zawarte w pliku KAR lub WRD. | |
77 | ||
78 | %description -l pt_BR.UTF-8 | |
79 | O TiMidity++ é um sintetizador MIDI por software. Este pacote permite | |
80 | ouvir arquivos do tipo MIDI com a mesma qualidade de som que as placas | |
81 | que utilizam o recurso de "wavetable" via hardware (como a AWE32), | |
82 | mesmo que esta não possua o recurso de "wavetable" (a SB16 por | |
83 | exemplo). | |
84 | ||
85 | %description -l ru.UTF-8 | |
86 | Проигрыватель MIDI файлов, не требующий поддержки инструментов MIDI | |
87 | звуковой платой. Использует файлы инструментов в формате GUS/patch, | |
88 | может также использовать данные в формате SoundFont. Обеспечивает | |
89 | отличное качество звука MIDI за счет интенсивного использования | |
90 | процессора. | |
91 | ||
92 | %description -l uk.UTF-8 | |
93 | Програвач MIDI файлів, якому не потрібна підтримка інструментів MIDI | |
94 | звуковою платою. Використовує файли інструментів у форматі GUS/patch, | |
95 | розуміє також формат SoundFont. Забезпечує відмінну якість звуку MIDI | |
96 | за рахунок інтенсивного використання процесора. | |
97 | ||
98 | %package gspdir | |
99 | Summary: Directory for TiMidity++ instruments | |
100 | Summary(pl.UTF-8): Katalog na instrumenty TiMidity++ | |
101 | Group: Applications/Sound | |
102 | ||
103 | %description gspdir | |
104 | Directory where TiMidity++ instruments should be placed in. | |
105 | ||
106 | %description gspdir -l pl.UTF-8 | |
107 | Katalog, w którym powinny być instalowane instrumenty dla TiMidity++. | |
108 | ||
109 | %package instruments | |
110 | Summary: Instruments for TiMidity++ | |
111 | Summary(pl.UTF-8): Instrumenty dla TiMidity++ | |
112 | Summary(pt_BR.UTF-8): Instrumentos básicos para o TiMidity++ | |
113 | Group: Applications/Sound | |
114 | Requires: %{name}-gspdir = %{version}-%{release} | |
115 | Obsoletes: timidity-patches | |
116 | ||
117 | %description instruments | |
118 | Instruments for TiMidity++. | |
119 | ||
120 | %description instruments -l pl.UTF-8 | |
121 | Instrumenty dla TiMidity++. | |
122 | ||
123 | %description instruments -l pt_BR.UTF-8 | |
124 | Este pacote inclui um conjunto básico de instrumentos (chamados de | |
125 | patches no meio musical) para o TiMidity++. | |
126 | ||
127 | %package gtk | |
128 | Summary: GTK+ interface for TiMidity++ | |
129 | Summary(pl.UTF-8): Interfejs TiMidity++ oparty o bibliotekę GTK+ | |
130 | Group: Applications/Sound | |
131 | Requires: %{name}(X) = %{version}-%{release} | |
132 | ||
133 | %description gtk | |
134 | gtkmidi - GTK+ interface for TiMidity++. | |
135 | ||
136 | %description gtk -l pl.UTF-8 | |
137 | gtkmidi - interfejs do TiMidity++ oparty o bibliotekę GTK+. | |
138 | ||
139 | %package motif | |
140 | Summary: Motif interface for TiMidity++ | |
141 | Summary(pl.UTF-8): Interfejs TiMidity++ oparty o Motif | |
142 | Group: Applications/Sound | |
143 | Requires: %{name}(X) = %{version}-%{release} | |
144 | ||
145 | %description motif | |
146 | xmmidi - Motif interface for TiMidity++. | |
147 | ||
148 | %description motif -l pl.UTF-8 | |
149 | xmmidi - interfejs do TiMidity++ oparty o bibliotekę Motif. | |
150 | ||
151 | %package slang | |
152 | Summary: Slang interface for TiMidity++ | |
153 | Summary(pl.UTF-8): Interfejs TiMidity++ oparty o bibliotekę Slang | |
154 | Group: Applications/Sound | |
155 | Requires: %{name} = %{version}-%{release} | |
156 | ||
157 | %description slang | |
158 | Slang interface for TiMidity++. | |
159 | ||
160 | %description slang -l pl.UTF-8 | |
161 | Interfejs do TiMidity++ oparty o bibliotekę Slang. | |
162 | ||
163 | %package tcltk | |
164 | Summary: Tcl/Tk interface for TiMidity++ | |
165 | Summary(pl.UTF-8): Interfejs TiMidity++ oparty o Tcl/Tk | |
166 | Group: Applications/Sound | |
167 | Requires: %{name}(X) = %{version}-%{release} | |
168 | ||
169 | %description tcltk | |
170 | tkmidi - Tcl/Tk interface for TiMidity++. | |
171 | ||
172 | %description tcltk -l pl.UTF-8 | |
173 | tkmidi - interfejs do TiMidity++ oparty o Tcl/Tk. | |
174 | ||
175 | %package vt100 | |
176 | Summary: VT100 interface for TiMidity++ | |
177 | Summary(pl.UTF-8): Interfejs TiMidity++ działający na terminalu VT100 | |
178 | Group: Applications/Sound | |
179 | Requires: %{name} = %{version}-%{release} | |
180 | ||
181 | %description vt100 | |
182 | VT100 interface for TiMidity++. | |
183 | ||
184 | %description vt100 -l pl.UTF-8 | |
185 | Interfejs do TiMidity++ mogący działać na terminalu VT100. | |
186 | ||
187 | %package xaw | |
188 | Summary: Athena interface for TiMidity++ | |
189 | Summary(pl.UTF-8): Interfejs TiMidity++ oparty o Athena Widgets | |
190 | Group: Applications/Sound | |
191 | Requires: %{name}(X) = %{version}-%{release} | |
192 | ||
193 | %description xaw | |
194 | xawmidi - Athena interface for TiMidity++. | |
195 | ||
196 | %description xaw -l pl.UTF-8 | |
197 | xawmidi - interfejs do TiMidity++ oparty o biblitekę widgetów Athena. | |
198 | ||
199 | %package xskin | |
200 | Summary: "X Skin" interface for TiMidity++ | |
201 | Summary(pl.UTF-8): Interfejs TiMidity++ "X Skin" | |
202 | Group: Applications/Sound | |
203 | Requires: %{name}(X) = %{version}-%{release} | |
204 | Obsoletes: TiMidity++ < 2.13.0-3 | |
205 | ||
206 | %description xskin | |
207 | xskinmidi - "X Skin" interface for TiMidity++. | |
208 | ||
209 | %description xskin -l pl.UTF-8 | |
210 | xskinmidi - interfejs do TiMidity++ "X Skin". | |
211 | ||
212 | %package alsaseq | |
213 | Summary: TiMidity++ ALSA sequencer interface | |
214 | Summary(pl.UTF-8): TiMidity++ jako interfejs sekwencera ALSA | |
215 | Group: Applications/Sound | |
216 | Requires(post,preun): /sbin/chkconfig | |
217 | Requires(post,preun,postun): systemd-units >= 38 | |
218 | Requires: %{name} = %{version}-%{release} | |
219 | Requires: rc-scripts | |
220 | Requires: systemd-units >= 38 | |
221 | ||
222 | %description alsaseq | |
223 | The ALSA sequencer interface communicates between ALSA sequencer core | |
224 | and timidity. The interface receives events from sequencer and plays | |
225 | it in (quasi-)real-time. In this mode, TiMidity works purely as the | |
226 | software real-time MIDI render, that is as a software MIDI synth | |
227 | engine on ALSA. | |
228 | ||
229 | %description alsaseq -l pl.UTF-8 | |
230 | Interfejs sekwencera ALSA komunikuje się między rdzeniem sekwencera | |
231 | ALSA a timidity. Interfejs odbiera zdarzenia od sekwencera od odtwarza | |
232 | je w czasie (prawie) rzeczywistym. W tym trybie TiMidity działa | |
233 | wyłącznie jako programowy odtwarzacz MIDI czasu rzeczywistego, czyli | |
234 | jako silnik syntezatora MIDI w architekturze ALSA. | |
235 | ||
236 | %prep | |
237 | %setup -q | |
238 | %patch0 -p1 | |
239 | %patch1 -p1 | |
240 | %patch2 -p0 | |
241 | %patch3 -p1 | |
242 | ||
243 | for f in doc/ja_JP.eucJP/README*; do | |
244 | mv -f $f ${f}.ja | |
245 | done | |
246 | ||
247 | %build | |
248 | cp -f /usr/share/automake/config.sub autoconf | |
249 | %{__autoconf} | |
250 | ||
251 | AUDIO=oss%{?with_alsa:,alsa}%{?with_arts:,arts}%{?with_esd:,esd}\ | |
252 | %{?with_jack:,jack}%{?with_nas:,nas}%{?with_vorbis:,vorbis} | |
253 | ||
254 | %configure \ | |
255 | CPPFLAGS="-DUSE_INTERP_RESULT %{rpmcppflags}" \ | |
256 | %{?with_alsa:--enable-alsaseq} \ | |
257 | --enable-audio=$AUDIO \ | |
258 | --enable-dynamic \ | |
259 | %{?with_x:--enable-gtk=dynamic} \ | |
260 | --enable-emacs=dynamic \ | |
261 | %{?with_x:--enable-motif=dynamic} \ | |
262 | --enable-ncurses=dynamic \ | |
263 | --enable-network \ | |
264 | --enable-server \ | |
265 | --enable-slang=dynamic \ | |
266 | %{?with_x:--enable-spectrogram} \ | |
267 | %{?with_x:--enable-tcltk=dynamic} \ | |
268 | --enable-vt100=dynamic \ | |
269 | %{?with_x:--enable-xaw=dynamic} \ | |
270 | %{?with_x:--enable-xskin=dynamic} \ | |
271 | --with-default-path=%{_sysconfdir} \ | |
272 | --with-elf \ | |
273 | %{!?with_x:--without-x} | |
274 | ||
275 | %{__make} \ | |
276 | SHLIB_DIR=%{_libdir}/timidity | |
277 | ||
278 | %install | |
279 | rm -rf $RPM_BUILD_ROOT | |
280 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}/GUSpatches,/etc/{rc.d/init.d,sysconfig}} \ | |
281 | $RPM_BUILD_ROOT{%{systemdunitdir},/etc/modules-load.d} | |
282 | ||
283 | %{__make} install \ | |
284 | DESTDIR=$RPM_BUILD_ROOT \ | |
285 | SHLIB_DIR=%{_libdir}/timidity | |
286 | ||
287 | ## based on timidity/timidity.c | |
288 | ##ln -s timidity $RPM_BUILD_ROOT%{_bindir}/kmidi # does it work? | |
289 | ln -sf timidity $RPM_BUILD_ROOT%{_bindir}/gtkmidi | |
290 | ln -sf timidity $RPM_BUILD_ROOT%{_bindir}/tkmidi | |
291 | ln -sf timidity $RPM_BUILD_ROOT%{_bindir}/xmmidi | |
292 | ln -sf timidity $RPM_BUILD_ROOT%{_bindir}/xawmidi | |
293 | ln -sf timidity $RPM_BUILD_ROOT%{_bindir}/xskinmidi | |
294 | ||
295 | install -d $RPM_BUILD_ROOT%{_mandir}/ja/man{1,5} | |
296 | install doc/ja_JP.eucJP/timidity.1 $RPM_BUILD_ROOT%{_mandir}/ja/man1 | |
297 | install doc/ja_JP.eucJP/timidity.cfg.5 $RPM_BUILD_ROOT%{_mandir}/ja/man5 | |
298 | ||
299 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} | |
300 | ||
301 | cd $RPM_BUILD_ROOT%{_datadir}/GUSpatches | |
302 | tar xzf %{SOURCE1} | |
303 | mv -f instruments/* . | |
304 | rmdir instruments | |
305 | bzip2 -cd %{SOURCE2} > britepno.pat | |
306 | bzip2 -cd %{SOURCE3} > pistol.pat | |
307 | ||
308 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/timidity | |
309 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/timidity | |
310 | ||
311 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/modules-load.d/timidity.conf | |
312 | install %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/timidity.service | |
313 | ||
314 | %clean | |
315 | rm -rf $RPM_BUILD_ROOT | |
316 | ||
317 | %post alsaseq | |
318 | /sbin/chkconfig --add timidity | |
319 | %service timidity restart "TiMidity++ ALSA sequencer interface" | |
320 | %systemd_post timidity.service | |
321 | ||
322 | %preun alsaseq | |
323 | if [ "$1" = "0" ]; then | |
324 | %service timidity stop | |
325 | /sbin/chkconfig --del timidity | |
326 | fi | |
327 | %systemd_preun timidity.service | |
328 | ||
329 | %postun alsaseq | |
330 | %systemd_reload | |
331 | ||
332 | %triggerpostun alsaseq -- %{name}-alsaseq < 2.13.2-8 | |
333 | %systemd_trigger timidity.service | |
334 | ||
335 | %files | |
336 | %defattr(644,root,root,755) | |
337 | %doc AUTHORS ChangeLog* NEWS README TODO doc/C/{CHANGES*,FAQ,README.[!tx]*} | |
338 | %lang(ja) %doc README.ja doc/ja_JP.eucJP/README.[!tx]*.ja | |
339 | %attr(755,root,root) %{_bindir}/timidity | |
340 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timidity.cfg | |
341 | %dir %{_libdir}/timidity | |
342 | %attr(755,root,root) %{_libdir}/timidity/interface_e.so | |
343 | %attr(755,root,root) %{_libdir}/timidity/interface_n.so | |
344 | %{_libdir}/timidity/interface_e.txt | |
345 | %{_libdir}/timidity/interface_n.txt | |
346 | %if "%{_lib}" != "lib" | |
347 | %dir %{_prefix}/lib/timidity | |
348 | %endif | |
349 | %{?with_x:%{_prefix}/lib/timidity/bitmaps} | |
350 | %{_mandir}/man1/timidity.1* | |
351 | %{_mandir}/man5/timidity.cfg.5* | |
352 | %lang(ja) %{_mandir}/ja/man1/timidity.1* | |
353 | %lang(ja) %{_mandir}/ja/man5/timidity.cfg.5* | |
354 | ||
355 | %files gspdir | |
356 | %defattr(644,root,root,755) | |
357 | %dir %{_datadir}/GUSpatches | |
358 | ||
359 | %files instruments | |
360 | %defattr(644,root,root,755) | |
361 | %{_datadir}/GUSpatches/* | |
362 | ||
363 | %if %{with x} | |
364 | %files gtk | |
365 | %defattr(644,root,root,755) | |
366 | %attr(755,root,root) %{_bindir}/gtkmidi | |
367 | %attr(755,root,root) %{_libdir}/timidity/interface_g.so | |
368 | %{_libdir}/timidity/interface_g.txt | |
369 | %endif | |
370 | ||
371 | %if %{with x} | |
372 | %files motif | |
373 | %defattr(644,root,root,755) | |
374 | %attr(755,root,root) %{_bindir}/xmmidi | |
375 | %attr(755,root,root) %{_libdir}/timidity/interface_m.so | |
376 | %{_libdir}/timidity/interface_m.txt | |
377 | %endif | |
378 | ||
379 | %files slang | |
380 | %defattr(644,root,root,755) | |
381 | %attr(755,root,root) %{_libdir}/timidity/interface_s.so | |
382 | %{_libdir}/timidity/interface_s.txt | |
383 | ||
384 | %if %{with x} | |
385 | %files tcltk | |
386 | %defattr(644,root,root,755) | |
387 | %doc doc/C/README.tk | |
388 | %lang(ja) %doc doc/ja_JP.eucJP/README.tk.ja | |
389 | %attr(755,root,root) %{_bindir}/tkmidi | |
390 | %attr(755,root,root) %{_libdir}/timidity/interface_k.so | |
391 | %{_libdir}/timidity/interface_k.txt | |
392 | %{_prefix}/lib/timidity/tclIndex | |
393 | %{_prefix}/lib/timidity/*.tcl | |
394 | %endif | |
395 | ||
396 | %files vt100 | |
397 | %defattr(644,root,root,755) | |
398 | %attr(755,root,root) %{_libdir}/timidity/interface_T.so | |
399 | %{_libdir}/timidity/interface_T.txt | |
400 | ||
401 | %if %{with x} | |
402 | %files xaw | |
403 | %defattr(644,root,root,755) | |
404 | %doc doc/C/README.xaw | |
405 | %lang(ja) %doc doc/ja_JP.eucJP/README.xaw.ja | |
406 | %attr(755,root,root) %{_bindir}/xawmidi | |
407 | %attr(755,root,root) %{_libdir}/timidity/interface_a.so | |
408 | %{_libdir}/timidity/interface_a.txt | |
409 | ||
410 | %files xskin | |
411 | %defattr(644,root,root,755) | |
412 | %doc doc/C/README.xskin | |
413 | %lang(ja) %doc doc/ja_JP.eucJP/README.xskin.ja | |
414 | %attr(755,root,root) %{_bindir}/xskinmidi | |
415 | %attr(755,root,root) %{_libdir}/timidity/interface_i.so | |
416 | %{_libdir}/timidity/interface_i.txt | |
417 | %endif | |
418 | ||
419 | %if %{with alsa} | |
420 | %files alsaseq | |
421 | %defattr(644,root,root,755) | |
422 | %attr(754,root,root) /etc/rc.d/init.d/timidity | |
423 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timidity | |
424 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/timidity.conf | |
425 | %{systemdunitdir}/timidity.service | |
426 | %endif |