]> git.pld-linux.org Git - packages/STonX.git/blob - STonX.spec
- adapterized
[packages/STonX.git] / STonX.spec
1 #
2 # Conditional build:
3 # _without_svga         without svgalib support
4 #
5
6 %ifnarch %{ix86} alpha
7 %define _without_svga 1
8 %endif
9
10 %define         tosarchname     tos206us.zip
11 %define         tosfilename     Tos206.img
12
13 Summary:        Atari ST on Unix/X
14 Summary(pl):    Atari ST pod Uniksem/X
15 Name:           STonX
16 Version:        0.6.5
17 Release:        1
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 # Source0-md5:  54ce49f5a64f0e7779000245a9b903a6
22 # to use TOS image legally, one probably must own real Atari ST...
23 Source1:        %{tosarchname}
24 NoSource:       1
25 Patch0:         %{name}-nox.patch
26 Patch1:         %{name}-svga.patch
27 URL:            http://www.complang.tuwien.ac.at/nino/stonx.html
28 BuildRequires:  XFree86-devel
29 %{!?_without_svga:BuildRequires:        svgalib-devel}
30 BuildRequires:  autoconf
31 BuildRequires:  unzip
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34
35 %description
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
38 ST computer.
39
40 %description -l pl
41 STonX jest programowym emulatorem komputera Atari ST, dzia³aj±cym na
42 Uniksach z X Window System%{!?_without_svga: lub svgalib}.
43
44 %prep
45 %setup -q -a1
46 %patch0 -p1
47 %patch1 -p1
48
49 mv -f %{tosfilename} tos.img
50
51 %build
52 %{__autoconf}
53 %configure
54
55 %{__make} \
56         OPT="%{rpmcflags}" \
57         REGS="%{!?debug:-fomit-frame-pointer}" \
58         %{!?_without_svga:USE_SVGALIB=1}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_libdir}/STonX,%{_bindir},%{_fontsdir}/misc}
63
64 install stonx tos.img cartridge.img Keysyms $RPM_BUILD_ROOT%{_libdir}/STonX
65
66 gzip -9nf data/*.pcf
67 install data/*.pcf.gz $RPM_BUILD_ROOT%{_fontsdir}/misc
68
69 cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<EOF
70 #!/bin/sh
71 cd %{_libdir}/STonX
72
73 %{!?_without_svga:if [ -z "\$DISPLAY" ]; then exec ./stonx -svga ; fi}
74 exec ./stonx
75 EOF
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 if [ -x /usr/X11R6/bin/mkfontdir ]; then
82         (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
83 fi
84 if [ -f /var/lock/subsys/xfs ]; then
85         /etc/rc.d/init.d/xfs reload
86 fi
87
88 %postun
89 if [ -x /usr/X11R6/bin/mkfontdir ]; then
90         (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
91 fi
92 if [ -f /var/lock/subsys/xfs ]; then
93         /etc/rc.d/init.d/xfs reload
94 fi
95
96 %files
97 %defattr(644,root,root,755)
98 %doc docs/{PROGRAMS,README,RELEASE_NOTES,TOS-VERSIONS}
99 %attr(755,root,root) %{_bindir}/*
100 %dir %{_libdir}/STonX
101 %attr(755,root,root) %{_libdir}/STonX/stonx
102 %{_libdir}/STonX/*.img
103 %{_libdir}/STonX/Keysyms
104 %{_fontsdir}/misc/*
This page took 0.072464 seconds and 4 git commands to generate.