1 |
%define oname TiMidity++ |
2 |
|
3 |
# Stick to /usr/lib/timidity on any platform |
4 |
# XXX probably better in /usr/share/timidity for arch independent data |
5 |
# but it's not worth splitting that much |
6 |
%define timiditydir %{_prefix}/lib/timidity |
7 |
|
8 |
# |
9 |
# When big change is involved (e.g. timidity.cfg change location), |
10 |
# so that new timidity binray and old patch RPM won't work together, |
11 |
# increment this number by 1 for all timidity related RPMs |
12 |
# |
13 |
%define patch_pkg_version 2 |
14 |
|
15 |
# |
16 |
# NOTE: When updating config for midia patch set, please refresh both |
17 |
# config file included here and the one in patch pkg |
18 |
# |
19 |
|
20 |
Summary: MIDI to WAVE converter and player |
21 |
Name: timidity++ |
22 |
Version: 2.15.0 |
23 |
Release: %mkrel 3 |
24 |
URL: https://timidity.sourceforge.net/ |
25 |
License: GPLv2+ |
26 |
Group: Sound/Midi |
27 |
Source0: https://download.sourceforge.net/timidity/%{oname}-%{version}.tar.xz |
28 |
Source1: https://www.timidity.jp/dist/cfg/timidity.cfg |
29 |
Source2: timidity-emacs-mode.el |
30 |
Source3: timidity.README.mga |
31 |
# (Abel) change default config path to /etc/timidity/timidity.cfg |
32 |
Patch0: timidity-2.13.2-default-config-path.patch |
33 |
Patch2: timidity-2.14.0-opensuse-zero-division-fix.patch |
34 |
Patch3: timidity-2.14.0-opensuse-out-of-bound-access-fix.patch |
35 |
Requires: timidity-instruments = %{patch_pkg_version} |
36 |
BuildRequires: pkgconfig(alsa) |
37 |
BuildRequires: autoconf |
38 |
BuildRequires: emacs-bin |
39 |
BuildRequires: gtk2-devel |
40 |
BuildRequires: pkgconfig(jack) |
41 |
BuildRequires: motif-devel |
42 |
BuildRequires: pkgconfig(ao) |
43 |
BuildRequires: pkgconfig(flac) >= 1.1.3 |
44 |
BuildRequires: pkgconfig(flac) |
45 |
BuildRequires: pkgconfig(ncurses) |
46 |
BuildRequires: oggvorbis-devel |
47 |
BuildRequires: portaudio-devel |
48 |
BuildRequires: pkgconfig(speex) |
49 |
BuildRequires: pkgconfig(tcl) |
50 |
BuildRequires: pkgconfig(tk) |
51 |
BuildRequires: pkgconfig(xaw7) |
52 |
BuildRequires: pkgconfig(slang) |
53 |
BuildRequires: imagemagick |
54 |
BuildConflicts: Xaw3d-devel |
55 |
Obsoletes: TiMidity++ < 2.14.0-11 |
56 |
Provides: TiMidity++ = %{version}-%{release} |
57 |
|
58 |
%description |
59 |
TiMidity is a MIDI to WAVE converter and player that uses Gravis |
60 |
Ultrasound(tm) or SoundFont(tm) patch files to generate digital audio data |
61 |
from general MIDI files. The audio data can be played through any |
62 |
sound device or stored on disk. |
63 |
|
64 |
%package interfaces-extra |
65 |
Summary: Extra GUI/text mode interfaces for TiMidity |
66 |
Group: Sound/Midi |
67 |
Requires: %{name} = %{version}-%{release} |
68 |
Requires: emacs-bin |
69 |
Obsoletes: TiMidity++-interfaces-extra < 2.14.0-11 |
70 |
|
71 |
%description interfaces-extra |
72 |
TiMidity is a MIDI to WAVE converter and player that uses Gravis |
73 |
Ultrasound(tm) or SoundFont(tm) patch files to generate digital audio data |
74 |
from general MIDI files. The audio data can be played through any |
75 |
sound device or stored on disk. |
76 |
|
77 |
Install this if you want to use TiMidity under other interfaces, such as |
78 |
Motif(or Lesstif), Tcl/Tk, emacs etc. |
79 |
|
80 |
%prep |
81 |
%setup -qn %{oname}-%{version} |
82 |
%patch0 -p1 -b .default-path |
83 |
# Apply ad-hoc patches from openSuSe for |
84 |
# CVE-2017-11546 and CVE-2017-11547 |
85 |
%patch2 -p1 -b .CVE-2017-11546 |
86 |
%patch3 -p1 -b .CVE-2017-11547 |
87 |
|
88 |
%build |
89 |
# fix build on aarch64 |
90 |
autoreconf -vfi |
91 |
|
92 |
# little ugly trick to force install of tclIndex, running wish requires |
93 |
# X display |
94 |
touch interface/tclIndex |
95 |
|
96 |
export SHLDFLAGS="%(echo %{build_ldflags}|sed -e 's/-Wl,--no-undefined//')" |
97 |
export EXTRADEFS="-DUSE_INTERP_RESULT" |
98 |
%configure \ |
99 |
--enable-audio=oss,alsa,portaudio,jack,ao,vorbis,flac,speex \ |
100 |
--enable-dynamic=dynamic,ncurses,slang,motif,tcltk,emacs,xaw,xskin,gtk \ |
101 |
--enable-interface=alsaseq \ |
102 |
--enable-network \ |
103 |
--enable-server \ |
104 |
--with-ao-libraries=%{_libdir} \ |
105 |
--with-ogg-libraries=%{_libdir} \ |
106 |
--with-vorbis-libraries=%{_libdir} \ |
107 |
--with-libFLAC-libraries=%{_libdir} |
108 |
%make_build |
109 |
|
110 |
%install |
111 |
%make_install |
112 |
install -d %{buildroot}%{_datadir}/timidity |
113 |
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/timidity/timidity-custom.cfg |
114 |
install -d %{buildroot}%{_datadir}/applications |
115 |
cat <<EOF > %{buildroot}%{_datadir}/applications/%{oname}.desktop |
116 |
[Desktop Entry] |
117 |
Name=TiMidity++ |
118 |
GenericName=MIDI file player |
119 |
GenericName[ar]=مشغل ملفات MIDI |
120 |
GenericName[az]=MIDI fayl çalğıcısı |
121 |
GenericName[bg]=MIDI плеър |
122 |
GenericName[bn]=মিডি ফাইল বাদক |
123 |
GenericName[br]=Ur soner a restr MIDI |
124 |
GenericName[bs]=Svirač MIDI datoteka |
125 |
GenericName[ca]=Reproductor de fitxers MIDI |
126 |
GenericName[cs]=Přehrávač hudebních souborů MIDI |
127 |
GenericName[cy]=Chwaraewr ffeil MIDI |
128 |
GenericName[da]=MIDI-musikafspiller |
129 |
GenericName[de]=MIDI Dateienspieler |
130 |
GenericName[el]=Πρόγραμμα αναπαραγωγής MIDI |
131 |
GenericName[es]=Reproductor de archivos MIDI |
132 |
GenericName[et]=MIDI failide mängija |
133 |
GenericName[eu]=MIDI fitxategi-erreproduzigailua |
134 |
GenericName[fa]=پخشگر پرونده MIDI |
135 |
GenericName[fi]=MIDI-soitin |
136 |
GenericName[fr]=Lecteur de fichiers MIDI |
137 |
GenericName[gl]=Reproductor de ficheiros MIDI |
138 |
GenericName[he]=נגן קבצי מידי |
139 |
GenericName[hi]=मीडी फ़ाइल प्लेयर |
140 |
GenericName[hu]=MIDI-fájllejátszó |
141 |
GenericName[id]=Pemutar file MIDI |
142 |
GenericName[is]=MIDI skráa spilari |
143 |
GenericName[it]=Riproduttore di file MIDI |
144 |
GenericName[ja]=MIDI プレーヤー |
145 |
GenericName[ky]=MIDI файлын ойноткучу |
146 |
GenericName[mk]=Плеер на „MIDI“ датотеки |
147 |
GenericName[mt]=Programm biex iddoqq mużika MIDI |
148 |
GenericName[nb]=MIDI-fil avspiller |
149 |
GenericName[nl]=MIDI bestandsspeler |
150 |
GenericName[nn]=MIDI-filspelar |
151 |
GenericName[pl]=Odtwarzacz plików MIDI |
152 |
GenericName[pt]=Leitor de ficheiros MIDI |
153 |
GenericName[pt_BR]=Player de arquivos MIDI |
154 |
GenericName[ro]=Lector de fișiere MIDI |
155 |
GenericName[ru]=Проигрыватель MIDI-файлов |
156 |
GenericName[sc]=Sonadori de file MIDI |
157 |
GenericName[sk]=Prehrávač MIDI hudby |
158 |
GenericName[sl]=Predvajalnik MIDI datotek |
159 |
GenericName[sq]=Lexues skedaresh MIDI |
160 |
GenericName[sv]=Spelar MIDI-filer |
161 |
GenericName[tg]=Бозигари MIDI файл |
162 |
GenericName[th]=โปรแกรมเล่นไฟล์ MIDI |
163 |
GenericName[tl]=Tagapagpatugtog ng MIDI file |
164 |
GenericName[tr]=MIDI dosya çalıcı |
165 |
GenericName[uk]=Програвач файлів MIDI |
166 |
GenericName[uz]=MIDI fayl pleyer |
167 |
GenericName[uz@cyrillic]=MIDI файл плейер |
168 |
GenericName[vi]=Trình chơi tập tin MIDI |
169 |
GenericName[wa]=Djouweu di fitchîs MIDI |
170 |
GenericName[zh_CN]=MIDI 文件播放机 |
171 |
GenericName[zh_TW]=MIDI 音樂播放程式 |
172 |
Comment=A midi to wav converter and midi file player |
173 |
Comment[de]=Ein Midi-zu-Wav-Konverter und Midi-Player |
174 |
Comment[ru]=Плейер MIDI-файлов и конвертор в WAV |
175 |
Exec=timidity -ig |
176 |
Icon=%{oname} |
177 |
Terminal=false |
178 |
Type=Application |
179 |
StartupNotify=true |
180 |
Categories=Audio;Midi; |
181 |
EOF |
182 |
|
183 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/48x48/apps |
184 |
convert interface/pixmaps/timidity.xpm %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{oname}.png |
185 |
|
186 |
# emacs mode |
187 |
install -m644 %{SOURCE2} -D %{buildroot}%{_sysconfdir}/emacs/site-start.d/timidity.el |
188 |
|
189 |
# japanese manpages |
190 |
install -m644 doc/ja_JP.eucJP/timidity.1 -D %{buildroot}%{_mandir}/ja/man1/timidity.1 |
191 |
install -m644 doc/ja_JP.eucJP/timidity.cfg.5 %{buildroot}%{_mandir}/ja/man1/timidity.cfg.5 |
192 |
|
193 |
%postun |
194 |
if [ "$1" = "0" ]; then |
195 |
%{_sbindir}/update-alternatives --remove timidity.cfg %{_sysconfdir}/timidity/timidity-custom.cfg |
196 |
fi |
197 |
|
198 |
%triggerpostun -- %{oname} <= 2.13.2-22 |
199 |
%{_sbindir}/update-alternatives --install %{_sysconfdir}/timidity/timidity.cfg timidity.cfg %{_sysconfdir}/timidity/timidity-custom.cfg 10 |
200 |
|
201 |
%files |
202 |
%doc AUTHORS ChangeLog INSTALL NEWS README doc/C/FAQ |
203 |
%doc doc/C/README.{alsaseq,dl,sf,m2m,mts} |
204 |
%config(noreplace) %{_sysconfdir}/timidity |
205 |
%{_bindir}/timidity |
206 |
%{_mandir}/man?/timidity* |
207 |
%lang(ja) %{_mandir}/ja/man?/* |
208 |
%{_datadir}/timidity |
209 |
%dir %{timiditydir} |
210 |
%{timiditydir}/if_gtk.so |
211 |
%{timiditydir}/if_ncurses.so |
212 |
%{_datadir}/applications/%{oname}.desktop |
213 |
%{_iconsdir}/hicolor/*/apps/%{oname}.png |
214 |
|
215 |
%files interfaces-extra |
216 |
%doc doc/C/README.{tk,xaw,xskin} |
217 |
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*.el |
218 |
%{timiditydir}/if_emacs.so |
219 |
%{timiditydir}/if_motif.so |
220 |
%{timiditydir}/if_slang.so |
221 |
%{timiditydir}/if_tcltk.so |
222 |
%{timiditydir}/if_xaw.so |
223 |
%{timiditydir}/if_xskin.so |
224 |
%{_datadir}/emacs/site-lisp/*.el |
225 |
%{timiditydir}/*.tcl |
226 |
%{timiditydir}/tclIndex |