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