]> git.pld-linux.org Git - packages/Atari800.git/blob - Atari800.spec
- allow building without svgalib, do so on non-x86
[packages/Atari800.git] / Atari800.spec
1 #
2 # Conditional build:
3 # _with_license_agreement - with unzipped ROM files instead of xf25.zip
4 # _without_svgalib        - without SVGA version
5 #
6 Summary:        Atari 800 Emulator
7 Summary(pl):    Emulator Atari 800
8 Name:           Atari800
9 Version:        1.2.2
10 Release:        1
11 License:        GPL (Atari800), distributable if unmodified (xf25 with ROMs)
12 Group:          Applications/Emulators
13 Group(de):      Applikationen/Emulators
14 Group(pl):      Aplikacje/Emulatory
15 Source0:        ftp://ftp.sourceforge.net/pub/sourceforge/atari800/atari800-%{version}.tar.gz
16 # NOTE: ROMs probably can be redistributed only in original XF25 archive
17 Source1:        http://joy.sophics.cz/www/xf25.zip
18 Source2:        %{name}-chooser
19 Patch0:         %{name}-shm_fix.patch
20 URL:            http://atari800.atari.org/
21 BuildRequires:  unzip
22 %ifarch %{ix86}
23 %{!?_without_svgalib:BuildRequires:     svgalib-devel}
24 %endif
25 BuildRequires:  XFree86-devel
26 BuildRequires:  zlib-devel
27 BuildRequires:  SDL-devel
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _xbindir        %{_prefix}/X11R6/bin
31
32 %description
33 This is Atari 800, 800XL, 130XE and 5200 emulator.
34
35 %description -l pl
36 To jest emulator Atari 800, 800XL, 130XE i 5200.
37
38 %package common
39 Summary:        Atari 800 Emulator - common files for svgalib and X11 versions
40 Summary(pl):    Emulator Atari 800 - pliki wspólne dla wersji svgalib oraz X11
41 Group:          Applications/Emulators
42 Group(de):      Applikationen/Emulators
43 Group(pl):      Aplikacje/Emulatory
44 Obsoletes:      Atari800
45 %{!?_with_license_agreement:Prereq:     unzip}
46
47 %description common
48 This is Atari 800, 800XL, 130XE and 5200 emulator.
49
50 This package contains common files for both svgalib and X11 versions
51 of Atari800.
52
53 %{!?_with_license_agreement:Note: because of license problems we had to include whole X-Former}
54 %{!?_with_license_agreement:archive (xf25.zip). If you don't want it - rebuild Atari800 by:}
55 %{!?_with_license_agreement:rpm --rebuild --with license_agreement ftp://ftp.pld.org.pl/PLD-1.0/SRPMS/SRPMS/%{name}-%{version}-%{release}.src.rpm}
56
57 %description common -l pl
58 To jest emulator Atari 800, 800XL, 130XE i 5200.
59
60 Ten pakiet zawiera pliki wspólne dla wersji dzia³aj±cych pod svgalib
61 oraz X11.
62
63 %{!?_with_license_agreement:Uwaga: z powodu problemów z licencj± musieli¶my za³±czyæ ca³± paczkê}
64 %{!?_with_license_agreement:z emulatorem X-Former (xf25.zip). Je¶li jej nie chcesz w pakiecie -}
65 %{!?_with_license_agreement:przebuduj pakiet poleceniem:}
66 %{!?_with_license_agreement:rpm --rebuild --with license_agreement ftp://ftp.pld.org.pl/PLD-1.0/SRPMS/SRPMS/%{name}-%{version}-%{release}.src.rpm}
67
68 %package svga
69 Summary:        Atari 800 Emulator - svgalib version
70 Summary(pl):    Emulator Atari 800 - wersja pod svgalib
71 License:        GPL
72 Group:          Applications/Emulators
73 Group(de):      Applikationen/Emulators
74 Group(pl):      Aplikacje/Emulatory
75 Requires:       %{name}-common = %{version}
76
77 %description svga
78 This is Atari 800, 800XL, 130XE and 5200 emulator.
79
80 This package contains Atari800 executable file configured for svgalib
81 with sound and joystick support.
82
83 %description svga -l pl
84 To jest emulator Atari 800, 800XL, 130XE i 5200.
85
86 Ten pakiet zawiera wykonywalny plik emulatora skonfigurowany dla
87 svgalib z obs³ug± d¼wiêku i joysticka.
88
89 %package x11
90 Summary:        Atari 800 Emulator - X Window version
91 Summary(pl):    Emulator Atari 800 - wersja pod X Window
92 License:        GPL
93 Group:          Applications/Emulators
94 Group(de):      Applikationen/Emulators
95 Group(pl):      Aplikacje/Emulatory
96 Requires:       %{name}-common = %{version}
97
98 %description x11
99 This is Atari 800, 800XL, 130XE and 5200 emulator.
100
101 This package contains Atari800 executable file configured for X11 with
102 sound and joystick support.
103
104 %description x11 -l pl
105 To jest emulator Atari 800, 800XL, 130XE i 5200.
106
107 Ten pakiet zawiera wykonywalny plik emulatora skonfigurowany dla X11 z
108 obs³ug± d¼wiêku i joysticka.
109
110 %package SDL
111 Summary:        Atari 800 Emulator - SDL version
112 Summary(pl):    Emulator Atari 800 - wersja pod SDL
113 License:        GPL
114 Group:          Applications/Emulators
115 Group(de):      Applikationen/Emulators
116 Group(pl):      Aplikacje/Emulatory
117 Requires:       %{name}-common = %{version}
118
119 %description SDL
120 This is Atari 800, 800XL, 130XE and 5200 emulator.
121
122 This package contains Atari800 executable file configured for SDL with
123 sound and joystick support.
124
125 %description SDL -l pl
126 To jest emulator Atari 800, 800XL, 130XE i 5200.
127
128 Ten pakiet zawiera wykonywalny plik emulatora skonfigurowany dla SDL z
129 obs³ug± d¼wiêku i joysticka.
130
131 %prep
132 %setup -q -n atari800-%{version}
133 %patch0 -p1
134
135 %build
136 cd src
137
138 %ifarch %{ix86}
139 %if %{?_without_svgalib:0}%{!?_without_svgalib:1}
140 %configure2_13 --target=svgalib \
141         --disable-VERY_SLOW \
142         --enable-NO_CYCLE_EXACT \
143         --enable-CRASH_MENU \
144         --enable-MONITOR_BREAK \
145         --enable-MONITOR_HINTS \
146         --enable-MONITOR_ASSEMBLER \
147         --enable-COMPILED_PALETTE \
148         --enable-SNAILMETER \
149         --disable-SVGA_SPEEDUP \
150         --enable-USE_CURSORBLOCK \
151         --disable-JOYMOUSE \
152         --enable-LINUX_JOYSTICK \
153         --enable-SOUND \
154         --enable-NO_VOL_ONLY \
155         --enable-NO_CONSOL_SOUND \
156         --disable-SERIO_SOUND \
157         --enable-NOSNDINTER \
158         --disable-CLIP \
159         --disable-STEREO \
160         --disable-BUFFERED_LOG \
161         --enable-SET_LED \
162         --enable-NO_LED_ON_SCREEN
163
164 %{__make} \
165         CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}" \
166         LDFLAGS="%{rpmldflags}"
167 mv -f atari800 atari800-svga
168
169 %{__make} clean
170 %endif
171 %endif
172
173 %configure2_13 --target=sdl \
174         --disable-VERY_SLOW \
175         --enable-NO_CYCLE_EXACT \
176         --enable-CRASH_MENU \
177         --enable-MONITOR_BREAK \
178         --enable-MONITOR_HINTS \
179         --enable-MONITOR_ASSEMBLER \
180         --enable-COMPILED_PALETTE \
181         --enable-SNAILMETER \
182         --enable-LINUX_JOYSTICK \
183         --enable-SOUND \
184         --enable-NO_VOL_ONLY \
185         --enable-NO_CONSOL_SOUND \
186         --disable-SERIO_SOUND \
187         --enable-NOSNDINTER \
188         --disable-CLIP \
189         --disable-STEREO \
190         --disable-BUFFERED_LOG \
191         --enable-SET_LED \
192         --enable-NO_LED_ON_SCREEN
193         
194 %{__make} \
195         CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer} -I/usr/X11R6/include/SDL" \
196         LDFLAGS="%{rpmldflags} -L/usr/X11R6/lib"
197 mv -f atari800 atari800-SDL
198
199 %{__make} clean
200
201 %configure2_13 --target=x11-shm \
202         --disable-VERY_SLOW \
203         --enable-NO_CYCLE_EXACT \
204         --enable-CRASH_MENU \
205         --enable-MONITOR_BREAK \
206         --enable-MONITOR_HINTS \
207         --enable-MONITOR_ASSEMBLER \
208         --enable-COMPILED_PALETTE \
209         --enable-SNAILMETER \
210         --enable-LINUX_JOYSTICK \
211         --enable-SOUND \
212         --enable-NO_VOL_ONLY \
213         --enable-NO_CONSOL_SOUND \
214         --disable-SERIO_SOUND \
215         --enable-NOSNDINTER \
216         --disable-CLIP \
217         --disable-STEREO
218
219 %{__make} \
220         CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer} -I/usr/X11R6/include" \
221         LDFLAGS="%{rpmldflags} -L/usr/X11R6/lib"
222 mv -f atari800 atari800-x11
223
224 sed s@/usr/local/lib/atari@%{_datadir}/atari800@g atari800.man >atari800.1
225
226 %install
227 rm -rf $RPM_BUILD_ROOT
228 install -d $RPM_BUILD_ROOT{%{_bindir},%{_xbindir}} \
229         $RPM_BUILD_ROOT{%{_datadir}/atari800,%{_mandir}/man1}
230
231 %ifarch %{ix86}
232 %{!?_without_svgalib:install src/atari800-svga $RPM_BUILD_ROOT%{_bindir}}
233 %endif
234 install src/atari800-x11 $RPM_BUILD_ROOT%{_xbindir}
235 install src/atari800-SDL $RPM_BUILD_ROOT%{_xbindir}
236 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/atari800
237 install src/atari800.1 $RPM_BUILD_ROOT%{_mandir}/man1/atari800.1
238
239 %if %{?_with_license_agreement:1}%{!?_with_license_agreement:0}
240 unzip -q -L %{SOURCE1} -d $RPM_BUILD_ROOT%{_datadir}/atari800
241 rm -f $RPM_BUILD_ROOT%{_datadir}/atari800/xf25.*
242 %else
243 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/atari800
244 %endif
245
246 gzip -9nf DOC/{BUGS,CHANGES,CREDITS,FAQ,README,TODO,USAGE} README.1ST \
247         DOC/{LPTjoy.txt,cart.txt,emuos.txt,pokeysnd.txt}
248
249 %clean
250 rm -rf $RPM_BUILD_ROOT
251
252 %if %{?_with_license_agreement:0}%{!?_with_license_agreement:1}
253 %post common
254 cd %{_datadir}/atari800
255 unzip -q -L xf25.zip
256 %endif
257
258 %files common
259 %defattr(644,root,root,755)
260 %doc  *.gz DOC/*.gz
261 %{_datadir}/atari800
262 %{_mandir}/man1/atari800.1*
263 %attr(755,root,root) %{_bindir}/atari800
264
265 %ifarch %{ix86}
266 %if %{?_without_svgalib:0}%{!?_without_svgalib:1}
267 %files svga
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_bindir}/atari800-svga
270 %endif
271 %endif
272
273 %files x11
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_xbindir}/atari800-x11
276
277 %files SDL
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_xbindir}/atari800-SDL
This page took 0.070833 seconds and 3 git commands to generate.