rpms/xpilot-ng/devel xpilot-ng.spec,1.3,1.4

Michael Thomas (wart) fedora-extras-commits at redhat.com
Wed Mar 1 23:21:19 UTC 2006


Author: wart

Update of /cvs/extras/rpms/xpilot-ng/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6198

Modified Files:
	xpilot-ng.spec 
Log Message:
Create a special xpilot user to run the server daemon.




Index: xpilot-ng.spec
===================================================================
RCS file: /cvs/extras/rpms/xpilot-ng/devel/xpilot-ng.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xpilot-ng.spec	1 Mar 2006 04:46:09 -0000	1.3
+++ xpilot-ng.spec	1 Mar 2006 23:21:18 -0000	1.4
@@ -1,6 +1,6 @@
 Name:           xpilot-ng
 Version:        4.7.2
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Multiplayer space arcade game
 
 Group:          Amusements/Games
@@ -23,6 +23,9 @@
 Requires(post): /sbin/service
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
+Requires(postun): /sbin/service
+Requires(pre):   fedora-usermgmt
+Requires(postun): fedora-usermgmt
 
 %description
 A highly addictive, infinitely configurable multiplayer space
@@ -48,12 +51,10 @@
 mv xpilot-ng-x11.man.new xpilot-ng-x11.man
 popd
 
-
 %build
 CFLAGS="$RPM_OPT_FLAGS" %configure
 make %{?_smp_mflags}
 
-
 %install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
@@ -96,6 +97,11 @@
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 
+%pre server
+/usr/sbin/fedora-groupadd 25 -r xpilot &>/dev/null || :
+/usr/sbin/fedora-useradd  25 -r -s /sbin/nologin -d /usr/share/xpilot-ng -M \
+                            -c 'XPilot Server' -g xpilot xpilot >/dev/null || :
+
 %post server
 /sbin/chkconfig --add xpilot-ng-server
 
@@ -109,6 +115,8 @@
 if [ "$1" -ge "1" ]; then
     /sbin/service xpilot-ng-server restart >/dev/null 2>&1
 fi
+test "$1" != 0 || /usr/sbin/fedora-userdel  xpilot &>/dev/null || :
+test "$1" != 0 || /usr/sbin/fedora-groupdel xpilot &>/dev/null || :
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -154,6 +162,10 @@
 %ghost %{_datadir}/%{name}/mapconvert.pyo
 
 %changelog
+* Wed Mar 1 2006 Wart <wart at kobold.org> 4.7.2-7
+- Create an xpilot user for running the server daemon
+- Fix typo in logrotate configuration file.
+
 * Tue Feb 28 2006 Wart <wart at kobold.org> 4.7.2-6
 - Added sysconfig and initrd files for starting xpilot server at boot time
 - Add copies of customizable configuration files to /etc/xpilot




More information about the fedora-extras-commits mailing list