SPECS: php-dirs.spec - http group creation as group is used in %files

glen glen at pld-linux.org
Thu Mar 23 18:47:49 CET 2006


Author: glen                         Date: Thu Mar 23 17:47:49 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- http group creation as group is used in %files

---- Files affected:
SPECS:
   php-dirs.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/php-dirs.spec
diff -u SPECS/php-dirs.spec:1.1 SPECS/php-dirs.spec:1.2
--- SPECS/php-dirs.spec:1.1	Thu Mar 23 18:44:09 2006
+++ SPECS/php-dirs.spec	Thu Mar 23 18:47:41 2006
@@ -5,10 +5,15 @@
 Release:	0.1
 License:	GPL
 Group:		Base
+BuildRequires:	rpmbuild(macros) >= 1.202
+Requires(postun):	/usr/sbin/groupdel
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Provides:	group(http)
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_phpsharedir	%{_datadir}/php
+%define		_tmpwatchdir	/etc/tmpwatch
 
 %description
 Common directories for PHP version 4 and version 5.
@@ -17,18 +22,26 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/php,/var/run/php,/etc/tmpwatch}
+install -d $RPM_BUILD_ROOT{%{_datadir}/php,/var/run/php,%{_tmpwatchdir}}
 
-echo '/var/run/php 720' > $RPM_BUILD_ROOT/etc/tmpwatch/php.conf
+echo '/var/run/php 720' > $RPM_BUILD_ROOT%{_tmpwatchdir}/php.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 51 http
+
+%postun
+if [ "$1" = "0" ]; then
+	%groupremove http
+fi
+
 %files
 %defattr(644,root,root,755)
 %dir %{_datadir}/php
 %attr(770,root,http) %dir %verify(not group mode) /var/run/php
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/php.conf
+%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/php.conf
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -36,6 +49,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2006/03/23 17:47:41  glen
+- http group creation as group is used in %files
+
 Revision 1.1  2006/03/23 17:44:09  glen
 - resolve overlaping dirs with {php4,php}-common
-
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php-dirs.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list