From 31b41079515bf194870ac407a83861161335f5ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 23 Mar 2006 17:47:41 +0000 Subject: [PATCH] - http group creation as group is used in %files Changed files: php-dirs.spec -> 1.2 --- php-dirs.spec | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/php-dirs.spec b/php-dirs.spec index 54838e5..519e5ca 100644 --- a/php-dirs.spec +++ b/php-dirs.spec @@ -4,10 +4,15 @@ Version: 0.9 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. @@ -16,15 +21,23 @@ Common directories for PHP version 4 and version 5. %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 -- 2.44.0