]> git.pld-linux.org Git - packages/STonX.git/blob - STonX.spec
- removed two lines with define
[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 # to use TOS image legally, one probably must own real Atari ST...
22 Source1:        %{tosarchname}
23 NoSource:       1
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
30 BuildRequires:  unzip
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33
34 %description
35 STonX is a software emulator, which runs on Unix workstations with the
36 X Window system%{!?_without_svga: or svgalib}, and emulates an Atari ST computer.
37
38 %description -l pl
39 STonX jest programowym emulatorem komputera Atari ST, dzia³aj±cym na
40 Uniksach z X Window System%{!?_without_svga: lub svgalib}.
41
42 %prep
43 %setup -q -a1
44 %patch0 -p1
45 %patch1 -p1
46
47 mv -f %{tosfilename} tos.img
48
49 %build
50 %{__autoconf}
51 %configure
52
53 %{__make} \
54         OPT="%{rpmcflags}" \
55         REGS="%{!?debug:-fomit-frame-pointer}" \
56         %{!?_without_svga:USE_SVGALIB=1}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_libdir}/STonX,%{_bindir},%{_fontsdir}/misc}
61
62 install stonx tos.img cartridge.img Keysyms $RPM_BUILD_ROOT%{_libdir}/STonX
63
64 gzip -9nf data/*.pcf
65 install data/*.pcf.gz $RPM_BUILD_ROOT%{_fontsdir}/misc
66
67 cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<EOF
68 #!/bin/sh
69 cd %{_libdir}/STonX
70
71 %{!?_without_svga:if [ -z "\$DISPLAY" ]; then exec ./stonx -svga ; fi}
72 exec ./stonx
73 EOF
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %post
79 if [ -x /usr/X11R6/bin/mkfontdir ]; then
80         (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
81 fi
82 if [ -f /var/lock/subsys/xfs ]; then
83         /etc/rc.d/init.d/xfs reload
84 fi
85
86 %postun
87 if [ -x /usr/X11R6/bin/mkfontdir ]; then
88         (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
89 fi
90 if [ -f /var/lock/subsys/xfs ]; then
91         /etc/rc.d/init.d/xfs reload
92 fi
93
94 %files
95 %defattr(644,root,root,755)
96 %doc docs/{PROGRAMS,README,RELEASE_NOTES,TOS-VERSIONS}
97 %attr(755,root,root) %{_bindir}/*
98 %dir %{_libdir}/STonX
99 %attr(755,root,root) %{_libdir}/STonX/stonx
100 %{_libdir}/STonX/*.img
101 %{_libdir}/STonX/Keysyms
102 %{_fontsdir}/misc/*
This page took 0.061813 seconds and 3 git commands to generate.