/[packages]/cauldron/yamagi-quake2/current/SPECS/yamagi-quake2.spec
ViewVC logotype

Contents of /cauldron/yamagi-quake2/current/SPECS/yamagi-quake2.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 176610 - (show annotations) (download)
Sun Dec 4 22:26:33 2011 UTC (12 years, 4 months ago) by stormi
File size: 12512 byte(s)
rework Obsoletes and Conflicts to ease upgrade from old quake2 package

1 %define oname quake2
2 %define icculus_version 3.00
3 %define rogue_source %{oname}-rogue
4 %define xatrix_source %{oname}-xatrix
5 %define rogue_version 1.04
6 %define xatrix_version 1.06
7
8 Summary: Quake II
9 Name: yamagi-%{oname}
10 Epoch: 1
11 Version: 3.00
12 Release: %mkrel 1
13 URL: http://www.yamagi.org/quake2/
14 Source0: %{oname}-%{version}.tar.bz2
15 Source1: %{rogue_source}-%{rogue_version}.tar.bz2
16 Source2: %{xatrix_source}-%{xatrix_version}.tar.bz2
17 Source6: q2ded.sh
18 Source7: q2ded.cfg
19 Source8: q2ctf.sh
20 Source9: q2ctf.cfg
21 Source11: %{oname}_16.png
22 Source12: %{oname}_32.png
23 Source13: %{oname}_48.png
24 Group: Games/Arcade
25 License: GPLv2
26 BuildRequires: SDL-devel
27 BuildRequires: aalib-devel
28 BuildRequires: svgalib-devel
29 BuildRequires: libx11-devel
30 BuildRequires: libvorbis-devel
31 Obsoletes: quake2 <= 3.22
32 Obsoletes: quake2-aa <= 3.22
33 Obsoletes: quake2-sdl <= 3.22
34 Obsoletes: quake2-svga <= 3.22
35 Obsoletes: quake2-x11 <= 3.22
36 Provides: quake2 = %epoch:%version
37 Conflicts: quake2 <= 3.22
38 Conflicts: quake2-aa <= 3.22
39 Conflicts: quake2-sdl <= 3.22
40 Conflicts: quake2-svga <= 3.22
41 Conflicts: quake2-x11 <= 3.22
42
43
44 %description
45 Shortly after landing on an alien surface you learn that hundreds of your men
46 have been reduced to just a few. Now you must fight your way through heavily
47 fortified military installations, lower the city's defenses and shut down
48 the enemy's war machine. Only then will the fate of humanity be known.
49
50 * Larger, mission-based levels:
51
52 You have a series of complex missions, what you do in one level could affect
53 another. One false move and you could alert security, flood an entire
54 passageway, or worse.
55
56 * Superior artificial intelligence:
57
58 This time the enemy has IQs the size of their appetites. The can evade your
59 attack, strategically position themselves for an ambush and hunt your ass
60 down.
61
62 * In-your-face sound and graphics
63
64 hear distant combat explosions and rockets whizzing past your head. And with
65 a compatible 3-D graphics accelerator, experience smoother 16-bit graphics and
66 real-time lighting effects.
67
68 * Wicked multiplayer capabilities
69
70 More than 32 players, friends or foes, can do at it in a bloody deathmatch via
71 LAN and over the internet.
72
73 -- You need PAK files for Quake II to run this game --
74
75 Install the PAK files in %{_gamesdatadir}/quake2.
76
77 %package ctf
78 Summary: Quake II Capture the Flag for Linux
79 Group: Games/Arcade
80 Requires: %{name} = %{epoch}:%{version} %{name}-server = %{epoch}:%{version}
81 Requires(preunt): rpm-helper
82 Requires(post): rpm-helper
83 Obsoletes: quake2-ctf <= 3.22
84 Provides: quake2-ctf = %epoch:%version
85 Conflicts: quake2-ctf <= 3.22
86
87 %description ctf
88 Quake II Capture The Flag (Q2CTF) is a multiplayer addon for Quake2 that
89 features a simple set of rules for team based play. It features eight unique
90 maps and special powerups to enhance and make the gameplay more exciting.
91
92 Q2CTF requires the full retail version of Quake II installed in order to
93 play. Once installed, you simple need to connect to a Quake2 game server
94 that is running the Q2CTF addon.
95
96 -- You need PAK files for Quake II to run this game --
97
98 %package glx
99 Summary: Quake II GLX client
100 Group: Games/Arcade
101 Requires: %{name} = %{epoch}:%{version}
102 Obsoletes: quake2-glx <= 3.22
103 Provides: quake2-glx = %epoch:%version
104 Conflicts: quake2-glx <= 3.22
105
106 %description glx
107 This archive contains Quake II for GLX.
108
109 -- You need PAK files for Quake II to run this game --
110
111 %package xatrix
112 Summary: Quake II Mission Pack #1: "The Reckoning" for Linux
113 Group: Games/Arcade
114 Requires: %{name} = %{epoch}:%{version}
115 Obsoletes: quake2-xatrix <= 3.22
116 Provides: quake2-xatrix = %epoch:%version
117 Conflicts: quake2-xatrix <= 3.22
118
119 %description xatrix
120 This archive contains Mission Pack "The Reckoning" for Quake II.
121
122 The Reckoning is sure to get your heart pumping...well, if you can avoid
123 getting gibbed by the Strogg. Check out just some of the features below that
124 will give you the cardiac workout you need!
125
126 * 18 arduous levels to conquer & 7 brutal deathmatch exclusive levels:
127
128 Dive into a series of mission-based campaigns and ransack your way through
129 three all-new hazardous episodes. Experience bioluminescent life forms,
130 stalagmites and stalactites and other breathtaking environments.
131
132 * Fresh foes to defeat:
133
134 Gekks are lighting-fast creatures that will hunt you down, leaping from the
135 shadows to claw or bite. Though innocent looking, the Repair Bot has the
136 ability to awaken dead Strogg from eternal sleep.
137
138 * Added weapons to wield:
139
140 The Phalanx Particle Canon emits a pulsing stream of deadly energy into
141 unsuspecting foes.
142
143 The Trap sucks nearby enemies inside and turns them into food cubes for
144 player consumption.
145
146 The Ion Ripper fires a blast of glowing boomerangs capable of ricocheting
147 off of walls to track targets.
148
149 -- You need PAK files for Quake II to run this game --
150
151 %package rogue
152 Summary: Quake II Mission Pack #2: "Ground Zero" for Linux
153 Group: Games/Arcade
154 Requires: %{name} = %{epoch}:%{version}
155 Obsoletes: quake2-rogue <= 3.22
156 Provides: quake2-rogue = %epoch:%version
157 Conflicts: quake2-rogue <= 3.22
158
159 %description rogue
160 This archive contains Mission Pack "Ground Zero" for Quake II.
161
162 The Alien Assault Continues.
163 Take out the Big Gun, sounded simple enough, except the Stroggs were waiting.
164 You and a few Marines like you, are the lucky ones. The Gravity Well, the
165 Stroggs' newest weapon in its arsenal against mankind, is operational. You've
166 made it down in one piece and are still able to contact the fleet. With the
167 fleet trapped around Stroggos, five percent of ground forces surviving, and
168 that number dwindling by the second, your orders have changed: Free your
169 comrades in orbit. Destroy the Gravity Well!
170
171 New Enemies
172
173 Get ready to face the toughest horde of Stroggs, straight from the bio-vats.
174 The Stalker, Turrets, Daedalus, Medic Commander, Carrier and the Queen Bitch
175 herself, the Black Widow.
176
177 14 Entirely new levels and 10 new deathmatch levels
178
179 Brand new real estate with the same dynamic sense of reality and dramatic
180 visuals as Quake II. These new environments will challenge even the biggest
181 Quake II aficionado.
182
183 New Power-ups
184
185 Tag 'em and Bag 'em. Deathmatch specific power-ups: the Vengeance Sphere,
186 Hunter Sphere, and Anti-matter Bomb. With everything that we've cooked up for
187 you here, you're sure to annihilate anyone or anything foolish enough to
188 call you foe.
189
190 New Weapons
191
192 The Chainsaw, ETF Rifle, and Plasma Beam. If you can't get the job done with
193 these babies, it's time to go back to Basic.
194
195 Accept no substitutes!
196 Official, id-authorized mission packs outpace the rest!
197
198 -- You need PAK files for Quake II to run this game --
199
200 %package server
201 Summary: Quake II server
202 Group: Games/Arcade
203 Requires: %{name} = %{epoch}:%{version}
204 Requires(preun): rpm-helper
205 Requires(post): rpm-helper
206 Obsoletes: quake2-server <= 3.22
207 Provides: quake2-server = %epoch:%version
208 Conflicts: quake2-server <= 3.22
209
210 %description server
211 This archive contains the Quake II dedicated server.
212
213 -- You need PAK files for Quake II to run this game --
214
215
216 %prep
217 %setup -q -T -b 0 -n %{oname}-%{version}
218 %setup -q -T -D -a 1 -n %{oname}-%{version}
219 %setup -q -T -D -a 2 -n %{oname}-%{version}
220
221 %build
222 %ifarch %{ix86} x86_64
223 export OPTFLAGS="-O2 -ffast-math -funroll-loops -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing"
224 %else
225 export OPTFLAGS="%{optflags} -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
226 %endif
227
228 %make
229
230 %install
231 rm -rf %{buildroot}
232
233 install -d %{buildroot}%{_sysconfdir}/quake2/{baseq2,ctf,rogue,xatrix}
234 install -d %{buildroot}%{_gamesbindir}
235 install -d %{buildroot}%{_gamesdatadir}/quake2/{baseq2,ctf,rogue,xatrix}
236 install -d %{buildroot}%{_libdir}/games/quake2/{baseq2,ctf,rogue,xatrix}
237
238 rel="release"
239 cp $rel/ref_*.so %{buildroot}%{_libdir}/games/quake2/
240 cp $rel/quake2 %{buildroot}%{_gamesbindir}/quake2.bin
241 cp $rel/q2ded %{buildroot}%{_gamesbindir}/q2ded.bin
242 cp $rel/baseq2/game.so %{buildroot}%{_libdir}/games/quake2/baseq2/
243 cp $rel/ctf/game.so %{buildroot}%{_libdir}/games/quake2/ctf/
244
245 install -m644 %{SOURCE7} -D %{buildroot}%{_sysconfdir}/quake2/baseq2/server.cfg
246 install -m644 %{SOURCE9} -D %{buildroot}%{_sysconfdir}/quake2/ctf/server.cfg
247
248 install -m755 %{SOURCE6} -D %{buildroot}%{_initrddir}/q2ded
249 install -m755 %{SOURCE8} -D %{buildroot}%{_initrddir}/q2ctf
250
251 for FILE in q2ded q2ctf ; do
252
253 # Edit path to q2ded in initscript
254 sed -i -e "s|daemon[ ].*\${NAME}|daemon %{_gamesbindir}/\${NAME}|" %{buildroot}%{_initrddir}/${FILE}
255
256 sed -i -e "s|^Q2_CONFIGDIR=.*|Q2_CONFIGDIR=\"%{_sysconfdir}/quake2\"|" %{buildroot}%{_initrddir}/${FILE}
257 done
258
259 # Create wrapper scripts
260 cat << EOF > %{buildroot}%{_gamesbindir}/quake2
261 #!/bin/sh
262
263 %{_gamesbindir}/quake2.bin +set basedir %{_libdir}/games/quake2 \$*
264
265 exit 0
266 EOF
267
268 cat << EOF > %{buildroot}%{_gamesbindir}/q2ded
269 #!/bin/sh
270
271 %{_gamesbindir}/q2ded.bin +set basedir %{_libdir}/games/quake2 \$*
272
273 exit 0
274 EOF
275
276 # Icons
277 install -m644 %{SOURCE11} -D %{buildroot}%{_miconsdir}/%{oname}.png
278 install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/%{oname}.png
279 install -m644 %{SOURCE13} -D %{buildroot}%{_liconsdir}/%{oname}.png
280
281 # Menu
282 %{__mkdir_p} %{buildroot}%{_datadir}/applications
283
284 cat << EOF > %{buildroot}%{_datadir}/applications/mageia-%{oname}.desktop
285 [Desktop Entry]
286 Name = Quake II
287 Comment = %{summary}
288 Exec = %{_gamesbindir}/quake2
289 Icon = %{oname}
290 Terminal=false
291 Type=Application
292 StartupNotify=false
293 Categories=Game;ArcadeGame;
294 EOF
295
296
297 cat << EOF > %{buildroot}%{_datadir}/applications/mageia-%{oname}-xatrix.desktop
298 [Desktop Entry]
299 Name = Quake II: The Reckoning
300 Comment = %{summary}
301 Exec=%{_gamesbindir}/quake2 +set game xatrix
302 Icon=%{oname}
303 Terminal=false
304 Type=Application
305 StartupNotify=true
306 Categories=Game;ArcadeGame;
307 EOF
308
309
310 cat << EOF > %{buildroot}%{_datadir}/applications/mageia-%{oname}-rogue.desktop
311 [Desktop Entry]
312 Name=Quake II: Ground Zero
313 Comment = %{summary}
314 Exec = %{_gamesbindir}/quake2 +set game rogue
315 Icon = %{oname}
316 Terminal=false
317 Type=Application
318 StartupNotify=true
319 Categories=Game;ArcadeGame;
320 EOF
321
322
323 cat << EOF > %{buildroot}%{_datadir}/applications/mageia-%{oname}-ctf.desktop
324 [Desktop Entry]
325 Name = Quake II: Capture The Flag
326 Comment = %{summary}
327 Exec = %{_gamesbindir}/quake2 +set game ctf
328 Icon = %{oname}
329 Terminal=false
330 Type=Application
331 StartupNotify=true
332 Categories=Game;ArcadeGame;X-MandrivaLinux-MoreApplications-Games-Arcade;
333 EOF
334
335 # Create links from basedir to configdir
336 ln -sf %{_sysconfdir}/quake2/baseq2/server.cfg %{buildroot}%{_libdir}/games/quake2/baseq2/server.cfg
337 for FILE in pak0.pak pak1.pak pak2.pak maxpak.pak ; do
338 ln -sf %{_gamesdatadir}/quake2/baseq2/${FILE} %{buildroot}%{_libdir}/games/quake2/baseq2/${FILE}
339 done
340 ln -sfn %{_gamesdatadir}/quake2/baseq2/video %{buildroot}%{_libdir}/games/quake2/baseq2/video
341 ln -sf %{_sysconfdir}/quake2/ctf/server.cfg %{buildroot}%{_libdir}/games/quake2/ctf/server.cfg
342 ln -sf %{_gamesdatadir}/quake2/ctf/pak0.pak %{buildroot}%{_libdir}/games/quake2/ctf/pak0.pak
343 ln -sf %{_gamesdatadir}/quake2/rogue/pak0.pak %{buildroot}%{_libdir}/games/quake2/rogue/pak0.pak
344 ln -sf %{_gamesdatadir}/quake2/xatrix/pak0.pak %{buildroot}%{_libdir}/games/quake2/xatrix/pak0.pak
345
346 %post server
347 %_post_service q2ded
348
349 %preun server
350 %_preun_service q2ded
351
352 %post ctf
353 %_post_service q2ctf
354
355 %preun ctf
356 %_preun_service q2ctf
357
358 %files
359 %defattr(-,root,root,-)
360 %doc README
361 %attr(755,root,root) %{_gamesbindir}/quake2
362 %{_gamesbindir}/quake2.bin
363 %dir %{_libdir}/games/quake2
364 %{_libdir}/games/quake2/baseq2
365 %{_datadir}/applications/mageia-%{oname}.desktop
366 %{_iconsdir}/%{oname}.png
367 %{_miconsdir}/%{oname}.png
368 %{_liconsdir}/%{oname}.png
369 %{_gamesdatadir}/quake2/baseq2
370
371 %files server
372 %attr(755,root,root) %{_initrddir}/q2ded
373 %attr(755,root,root) %{_gamesbindir}/q2ded
374 %dir %{_sysconfdir}/quake2
375 %dir %{_sysconfdir}/quake2/baseq2
376 %config(noreplace) %{_sysconfdir}/quake2/baseq2/server.cfg
377 %{_gamesbindir}/q2ded.bin
378
379 %files ctf
380 %attr(755,root,root) %{_initrddir}/q2ctf
381 %dir %{_sysconfdir}/quake2/ctf
382 %config(noreplace) %{_sysconfdir}/quake2/ctf/server.cfg
383 %{_libdir}/games/quake2/ctf
384 %{_gamesdatadir}/quake2/ctf
385 %{_datadir}/applications/mageia-%{oname}-ctf.desktop
386
387 %files glx
388 %{_libdir}/games/quake2/ref_gl.so
389
390 %files rogue
391 %{_libdir}/games/quake2/rogue
392 %{_gamesdatadir}/quake2/rogue
393 %{_datadir}/applications/mageia-%{oname}-rogue.desktop
394
395 %files xatrix
396 %{_libdir}/games/quake2/xatrix
397 %{_gamesdatadir}/quake2/xatrix
398 %{_datadir}/applications/mageia-%{oname}-xatrix.desktop
399

  ViewVC Help
Powered by ViewVC 1.1.30