3 # _without_svga without svgalib support
7 %define _without_svga 1
10 %define tosarchname tos206us.zip
11 %define tosfilename Tos206.img
13 Summary: Atari ST on Unix/X
14 Summary(pl): Atari ST pod Uniksem/X
18 License: GPL (except TOS image)
19 Group: Applications/Emulators
20 Source0: http://www.complang.tuwien.ac.at/nino/stonx/%{name}-%{version}.tar.gz
21 # to use TOS image legally, one probably must own real Atari ST...
22 Source1: %{tosarchname}
24 Patch0: %{name}-nox.patch
25 Patch1: %{name}-svga.patch
26 URL: http://www.complang.tuwien.ac.at/nino/stonx.html
27 BuildRequires: XFree86-devel
28 %{!?_without_svga:BuildRequires: svgalib-devel}
29 BuildRequires: autoconf
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _prefix /usr/X11R6
36 STonX is a software emulator, which runs on Unix workstations with the
37 X Window system%{!?_without_svga: or svgalib}, and emulates an Atari ST computer.
40 STonX jest programowym emulatorem komputera Atari ST, dzia³aj±cym na
41 Uniksach z X Window System%{!?_without_svga: lub svgalib}.
48 mv -f %{tosfilename} tos.img
56 REGS="%{!?debug:-fomit-frame-pointer}" \
57 %{!?_without_svga:USE_SVGALIB=1}
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_libdir}/STonX,%{_bindir},%{_fontsdir}/misc}
63 install stonx tos.img cartridge.img Keysyms $RPM_BUILD_ROOT%{_libdir}/STonX
66 install data/*.pcf.gz $RPM_BUILD_ROOT%{_fontsdir}/misc
68 cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<EOF
72 %{!?_without_svga:if [ -z "\$DISPLAY" ]; then exec ./stonx -svga ; fi}
76 gzip -9nf docs/{PROGRAMS,README,RELEASE_NOTES,TOS-VERSIONS}
79 rm -rf $RPM_BUILD_ROOT
82 if [ -x /usr/X11R6/bin/mkfontdir ]; then
83 (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
85 if [ -f /var/lock/subsys/xfs ]; then
86 /etc/rc.d/init.d/xfs reload
90 if [ -x /usr/X11R6/bin/mkfontdir ]; then
91 (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
93 if [ -f /var/lock/subsys/xfs ]; then
94 /etc/rc.d/init.d/xfs reload
98 %defattr(644,root,root,755)
100 %attr(755,root,root) %{_bindir}/*
101 %dir %{_libdir}/STonX
102 %attr(755,root,root) %{_libdir}/STonX/stonx
103 %{_libdir}/STonX/*.img
104 %{_libdir}/STonX/Keysyms