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