SPECS: quake3.spec - FHS: /var/games/quake3 and /usr/share/games/q...

glen glen at pld-linux.org
Sat Oct 15 20:30:33 CEST 2005


Author: glen                         Date: Sat Oct 15 18:30:33 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- FHS: /var/games/quake3 and /usr/share/games/quake3
- finished triggers

---- Files affected:
SPECS:
   quake3.spec (1.41 -> 1.42) 

---- Diffs:

================================================================
Index: SPECS/quake3.spec
diff -u SPECS/quake3.spec:1.41 SPECS/quake3.spec:1.42
--- SPECS/quake3.spec:1.41	Sat Oct 15 20:10:24 2005
+++ SPECS/quake3.spec	Sat Oct 15 20:30:27 2005
@@ -1,15 +1,11 @@
 # $Revision$, $Date$
-# TODO:
-#  - some trigger for upgrating from binary version
-#    (quake3 user home/shell changes)
-#
 %define	_dataver	1.32b-3
 Summary:	Quake3 for Linux
 Summary(pl):	Quake3 dla Linuksa
 Name:		quake3
 Version:	1.33
 %define	_snap	20051014
-Release:	0.%{_snap}.0.1
+Release:	0.%{_snap}.0.9
 License:	GPL
 Group:		Applications/Games
 Source0:	http://sparky.homelinux.org/snaps/icculus/%{name}-%{_snap}.tar.bz2
@@ -99,7 +95,7 @@
 
 %build
 CFLAGS="%{rpmcflags}"
-CFLAGS="$CFLAGS -DDEFAULT_BASEDIR=\\\"%{_datadir}/%{name}\\\""
+CFLAGS="$CFLAGS -DDEFAULT_BASEDIR=\\\"%{_datadir}/games/%{name}\\\""
 CFLAGS="$CFLAGS -Wall -Wimplicit -Wstrict-prototypes"
 CFLAGS="$CFLAGS -DUSE_SDL=1 $(sdl-config --cflags)"
 CFLAGS="$CFLAGS -DNDEBUG -MMD"
@@ -116,14 +112,14 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
-	$RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name}/baseq3} \
+	$RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/baseq3} \
 	$RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
-	$RPM_BUILD_ROOT/home/services/quake3
+	$RPM_BUILD_ROOT/var/games/quake3
 
 %{__make} -C code/unix install	\
 	BR="release-%{_target}"	\
 	BINDIR=$RPM_BUILD_ROOT%{_bindir}		\
-	DATADIR=$RPM_BUILD_ROOT%{_datadir}/%{name}	\
+	DATADIR=$RPM_BUILD_ROOT%{_datadir}/games/%{name}	\
 	LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}
 
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/q3ded
@@ -131,7 +127,7 @@
 install %{SOURCE4} $RPM_BUILD_ROOT%{_pixmapsdir}
 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/quake3.desktop
 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}/quake3-smp.desktop
-install data/baseq3/pak?.pk3 $RPM_BUILD_ROOT%{_datadir}/%{name}/baseq3
+install data/baseq3/pak?.pk3 $RPM_BUILD_ROOT%{_datadir}/games/%{name}/baseq3
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -139,7 +135,7 @@
 %post common
 if [ "$1" = "1" ]; then
 	echo ""
-	echo "You need to copy pak0.pk3 from your Quake3 CD into %{_datadir}/%{name}/baseq3/."
+	echo "You need to copy pak0.pk3 from your Quake3 CD into %{_datadir}/games/%{name}/baseq3/."
 	echo "Or if you have got a Windows installation of Q3 make a symlink to save space."
 	echo "You may place it in ~/.q3a/baseq3/ but you will have to put all pak files there (or make symlinks)."
 	echo ""
@@ -147,12 +143,7 @@
 
 %pre server
 %groupadd -P %{name}-server -g 38 quake3
-%useradd -m -P %{name}-server -u 124 -d /home/services/quake3 -s /bin/sh -c "Quake ]|[ Arena" -g quake3 quake3
-
-%triggerpostun server -- %{name}-common < 1.33
-if [ "`getent passwd quake3 | cut -d: -f6`" = "/opt/quake3" ]; then
-	/usr/sbin/usermod -d /home/services/quake3 quake3 -s /bin/sh
-fi
+%useradd -m -P %{name}-server -u 124 -d /var/games/quake3 -s /bin/sh -c "Quake ]|[ Arena" -g quake3 quake3
 
 %post server
 /sbin/chkconfig --add q3ded
@@ -176,6 +167,17 @@
 	%groupremove quake3
 fi
 
+%triggerpostun server -- %{name}-server < 1.33
+if [ "`getent passwd quake3 | cut -d: -f6`" = "/opt/quake3" ]; then
+	/usr/sbin/usermod -d /var/games/quake3 -s /bin/sh quake3
+fi
+
+%triggerpostun common -- %{name}-common < 1.33
+if [ "$1" = "0" ]; then
+	%userremove quake3
+	%groupremove quake3
+fi
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/quake3
@@ -184,7 +186,8 @@
 %files common
 %defattr(644,root,root,755)
 %doc id-readme.txt i_o-q3-readme data/Q3A_EULA.txt data/README-linux.txt data/pb/PB_EULA.txt
-%{_datadir}/%{name}
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*
 %{_pixmapsdir}/quake3.png
 
 %files server
@@ -192,7 +195,7 @@
 %attr(754,root,root) /etc/rc.d/init.d/q3ded
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/q3ded
 %attr(755,root,root) %{_bindir}/q3ded
-%attr(750,quake3,quake3) /home/services/quake3
+%attr(750,quake3,quake3) /var/games/quake3
 
 %if 0
 # broken
@@ -208,6 +211,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.42  2005/10/15 18:30:27  glen
+- FHS: /var/games/quake3 and /usr/share/games/quake3
+- finished triggers
+
 Revision 1.41  2005/10/15 18:10:24  glen
 - trigger (not tested)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/quake3.spec?r1=1.41&r2=1.42&f=u




More information about the pld-cvs-commit mailing list