2 %define dataver 1.32b3-1
5 Summary: Quake3 for Linux
6 Summary(de.UTF-8): Quake3 für Linux
7 Summary(pl.UTF-8): Quake3 dla Linuksa
10 Release: 0.%{snap}.%{rel}
12 Group: X11/Applications/Games
13 # svn export svn://svn.icculus.org/quake3/branches/1.36 quake3
14 Source0: %{name}-%{snap}.tar.bz2
15 # Source0-md5: 64fb50ede462b45bc0c2e289b04bd244
17 Source3: q3ded.sysconfig
18 Source4: %{name}.desktop
19 Source5: %{name}-smp.desktop
20 Patch0: %{name}-QUAKELIBDIR.patch
21 Patch1: %{name}-alpha.patch
22 Patch2: %{name}-strcpy-abuse.patch
23 URL: http://ioquake3.org/
24 BuildRequires: OpenAL-devel
25 BuildRequires: OpenGL-GLU-devel
26 BuildRequires: OpenGL-devel
27 BuildRequires: SDL-devel
28 BuildRequires: curl-devel
29 BuildRequires: libvorbis-devel
30 BuildRequires: pkgconfig
31 BuildRequires: rpmbuild(macros) >= 1.268
32 #BuildRequires: speex-devel
34 Requires: %{name}-common = %{version}-%{release}
36 Requires: quake3-data >= %{dataver}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 # source has been fixed to work without those
40 %define filterout_c -fwrapv -fno-strict-aliasing -fsigned-char
42 %define specflags -ffast-math -funroll-loops -fomit-frame-pointer
43 %define x86_flags -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fstrength-reduce
44 %define specflags_ia32 %{x86_flags}
45 %define specflags_x86_64 %{x86_flags}
46 %define specflags_amd64 %{x86_flags}
47 %define specflags_ia32e %{x86_flags}
48 %define _noautoreqdep libGL.so.1 libGLU.so.1
53 %description -l de.UTF-8
56 %description -l pl.UTF-8
60 Summary: Quake3 server
61 Summary(de.UTF-8): Quake3 Server
62 Summary(pl.UTF-8): Serwer Quake3
63 Group: X11/Applications/Games
64 Requires(post,preun): /sbin/chkconfig
65 Requires(postun): /usr/sbin/groupdel
66 Requires(postun): /usr/sbin/userdel
67 Requires(pre): /bin/id
68 Requires(pre): /usr/bin/getgid
69 Requires(pre): /usr/sbin/groupadd
70 Requires(pre): /usr/sbin/useradd
71 Requires(triggerpostun): /usr/sbin/usermod
72 Requires: %{name}-common = %{version}-%{release}
76 Provides: group(quake3)
77 Provides: user(quake3)
82 %description server -l de.UTF-8
85 %description server -l pl.UTF-8
89 Summary: Quake3 for SMP
90 Summary(de.UTF-8): Quake3 für SMP
91 Summary(pl.UTF-8): Quake3 dla SMP
92 Group: X11/Applications/Games
93 Requires: %{name}-common = %{version}-%{release}
94 Requires: quake3-data >= %{dataver}
97 Quake3 for multi processor machine.
99 %description smp -l de.UTF-8
100 Quake3 für Multiprocessor Rechner.
102 %description smp -l pl.UTF-8
103 Quake3 dla maszyny wieloprocesorowej.
106 Summary: Common files for Quake3
107 Summary(de.UTF-8): Gemeinsame Dateien für Quake3
108 Summary(pl.UTF-8): Pliki wspólne dla Quake3
109 Group: X11/Applications/Games
110 Requires(triggerpostun): /usr/sbin/groupdel
111 Requires(triggerpostun): /usr/sbin/userdel
112 Obsoletes: quake3-single
115 Common files for Quake3 server and player game.
117 %description common -l de.UTF-8
118 Gemeinsame Dateien für den Quake3 Server und das Spiel.
120 %description common -l pl.UTF-8
121 Pliki wspólne Quake3 dla serwera i trybu gracza.
130 cat << 'EOF' > Makefile.local
140 USE_OPENAL_DLOPEN = 0
146 USE_INTERNAL_SPEEX = 1
147 USE_LOCAL_HEADERS = 0
148 GENERATE_DEPENDENCIES = 0
150 DEFAULT_BASEDIR = %{_datadir}/games/%{name}
152 override OPTIMIZE = %{rpmcflags} \
153 -DQUAKELIBDIR=\\\"%{_libdir}/%{name}\\\"
157 override CC = %{__cc}
158 override LDFLAGS = %{rpmldflags}
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
168 $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/baseq3} \
169 $RPM_BUILD_ROOT%{_libdir}/%{name}/{baseq3,missionpack} \
170 $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
171 $RPM_BUILD_ROOT/var/games/quake3
173 install rel/ioquake3.* $RPM_BUILD_ROOT%{_bindir}/%{name}
174 #install rel/ioquake3-smp.* $RPM_BUILD_ROOT%{_bindir}/%{name}-smp
175 install rel/ioq3ded.* $RPM_BUILD_ROOT%{_bindir}/q3ded
177 install rel/baseq3/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/baseq3
178 install rel/missionpack/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/missionpack
180 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/q3ded
181 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/q3ded
182 install misc/%{name}.svg $RPM_BUILD_ROOT%{_pixmapsdir}
183 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/quake3.desktop
184 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/quake3-smp.desktop
187 rm -rf $RPM_BUILD_ROOT
190 if [ "$1" = "1" ]; then
192 echo "You need to copy pak0.pk3 from your Quake3 CD into %{_datadir}/games/%{name}/baseq3/."
193 echo "Or if you have got a Windows installation of Q3 make a symlink to save space."
194 echo "You may place it in ~/.q3a/baseq3/ but you will have to put all pak files there (or make symlinks)."
199 %groupadd -P %{name}-server -g 38 quake3
200 %useradd -P %{name}-server -u 124 -d /var/games/quake3 -s /bin/sh -c "Quake ]|[ Arena" -g quake3 quake3
203 /sbin/chkconfig --add q3ded
204 %service q3ded restart "Quake3 server"
207 if [ "$1" = "0" ]; then
209 /sbin/chkconfig --del q3ded
213 if [ "$1" = "0" ]; then
218 %triggerpostun server -- %{name}-server < 1.33
219 # server will fail because of lack of pak0.pk3
221 if [ "`getent passwd quake3 | cut -d: -f6`" = "/opt/quake3" ]; then
222 /usr/sbin/usermod -d /var/games/quake3 -s /bin/sh quake3
225 %triggerpostun common -- %{name}-common < 1.33
226 if [ ! -f %{_datadir}/games/%{name}/baseq3/pak0.pk3 ]; then
227 # Better don't link/move automatically, /opt may be on other partition than /usr
229 echo "Quake 3 data location has changed, link or move pak0.pk3 to %{_datadir}/games/%{name}/baseq3/."
233 if [ "$1" = "0" ]; then
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/quake3
241 %{_desktopdir}/quake3.desktop
244 %defattr(644,root,root,755)
245 %doc BUGS id-readme.txt README ChangeLog TODO
246 %dir %{_datadir}/games/%{name}
247 %dir %{_datadir}/games/%{name}/baseq3
248 %{_pixmapsdir}/quake3.svg
249 %dir %{_libdir}/%{name}
250 %dir %{_libdir}/%{name}/baseq3
251 %dir %{_libdir}/%{name}/missionpack
252 %attr(755,root,root) %{_libdir}/%{name}/baseq3/*.so
253 %attr(755,root,root) %{_libdir}/%{name}/missionpack/*.so
256 %defattr(644,root,root,755)
257 %attr(754,root,root) /etc/rc.d/init.d/q3ded
258 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/q3ded
259 %attr(755,root,root) %{_bindir}/q3ded
260 %attr(750,quake3,quake3) /var/games/quake3
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{_bindir}/quake3-smp
266 %{_desktopdir}/quake3-smp.desktop