]>
Commit | Line | Data |
---|---|---|
28b1d266 JB |
1 | # |
2 | # Conditional build: | |
64240fba | 3 | %bcond_without svga # without svgalib support |
28b1d266 | 4 | # |
28b1d266 JB |
5 | %define tosarchname tos206us.zip |
6 | %define tosfilename Tos206.img | |
7 | ||
8 | Summary: Atari ST on Unix/X | |
24cca171 | 9 | Summary(pl.UTF-8): Atari ST pod Uniksem/X |
28b1d266 JB |
10 | Name: STonX |
11 | Version: 0.6.5 | |
a2c54230 | 12 | Release: 2 |
28b1d266 JB |
13 | License: GPL (except TOS image) |
14 | Group: Applications/Emulators | |
28b1d266 | 15 | Source0: http://www.complang.tuwien.ac.at/nino/stonx/%{name}-%{version}.tar.gz |
ec57f8bb | 16 | # Source0-md5: 54ce49f5a64f0e7779000245a9b903a6 |
28b1d266 JB |
17 | # to use TOS image legally, one probably must own real Atari ST... |
18 | Source1: %{tosarchname} | |
19 | NoSource: 1 | |
20 | Patch0: %{name}-nox.patch | |
21 | Patch1: %{name}-svga.patch | |
a2c54230 JB |
22 | Patch2: %{name}-link.patch |
23 | Patch3: %{name}-segv.patch | |
28b1d266 | 24 | URL: http://www.complang.tuwien.ac.at/nino/stonx.html |
a2c54230 | 25 | BuildRequires: autoconf >= 2.59-9 |
ae6a3290 ER |
26 | BuildRequires: rpmbuild(macros) >= 1.268 |
27 | %{?with_svga:BuildRequires: svgalib-devel} | |
28b1d266 | 28 | BuildRequires: unzip |
a2c54230 | 29 | BuildRequires: xorg-lib-libXext-devel |
50c824b0 | 30 | Requires(post,postun): fontpostinst |
28b1d266 JB |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
28b1d266 JB |
33 | %description |
34 | STonX is a software emulator, which runs on Unix workstations with the | |
ae6a3290 ER |
35 | X Window system%{?with_svga: or svgalib}, and emulates an Atari ST |
36 | computer. | |
28b1d266 | 37 | |
35c12501 JR |
38 | %description -l pl.UTF-8 |
39 | STonX jest programowym emulatorem komputera Atari ST, działającym na | |
64240fba | 40 | Uniksach z X Window System%{?with_svga: lub svgalib}. |
28b1d266 JB |
41 | |
42 | %prep | |
43 | %setup -q -a1 | |
44 | %patch0 -p1 | |
45 | %patch1 -p1 | |
a2c54230 JB |
46 | %patch2 -p1 |
47 | %patch3 -p1 | |
28b1d266 JB |
48 | |
49 | mv -f %{tosfilename} tos.img | |
50 | ||
51 | %build | |
d2fd0ab9 | 52 | %{__autoconf} |
28b1d266 JB |
53 | %configure |
54 | ||
55 | %{__make} \ | |
56 | OPT="%{rpmcflags}" \ | |
57 | REGS="%{!?debug:-fomit-frame-pointer}" \ | |
64240fba | 58 | %{?with_svga:USE_SVGALIB=1} |
28b1d266 JB |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | install -d $RPM_BUILD_ROOT{%{_libdir}/STonX,%{_bindir},%{_fontsdir}/misc} | |
ca9f2511 | 63 | |
28b1d266 | 64 | install stonx tos.img cartridge.img Keysyms $RPM_BUILD_ROOT%{_libdir}/STonX |
ca9f2511 | 65 | |
28b1d266 JB |
66 | gzip -9nf data/*.pcf |
67 | install data/*.pcf.gz $RPM_BUILD_ROOT%{_fontsdir}/misc | |
68 | ||
ae6a3290 | 69 | cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<'EOF' |
28b1d266 JB |
70 | #!/bin/sh |
71 | cd %{_libdir}/STonX | |
72 | ||
ae6a3290 | 73 | %{?with_svga:if [ -z "$DISPLAY" ]; then exec ./stonx -svga ; fi} |
28b1d266 JB |
74 | exec ./stonx |
75 | EOF | |
76 | ||
28b1d266 JB |
77 | %clean |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %post | |
50c824b0 | 81 | fontpostinst misc |
28b1d266 JB |
82 | |
83 | %postun | |
50c824b0 | 84 | fontpostinst misc |
28b1d266 JB |
85 | |
86 | %files | |
87 | %defattr(644,root,root,755) | |
e35acd85 | 88 | %doc docs/{PROGRAMS,README,RELEASE_NOTES,TOS-VERSIONS} |
28b1d266 JB |
89 | %attr(755,root,root) %{_bindir}/* |
90 | %dir %{_libdir}/STonX | |
91 | %attr(755,root,root) %{_libdir}/STonX/stonx | |
92 | %{_libdir}/STonX/*.img | |
93 | %{_libdir}/STonX/Keysyms | |
50c824b0 | 94 | %{_fontsdir}/misc/*.pcf.gz |