]> TLD Linux GIT Repositories - packages/php-dirs.git/blob - php-dirs.spec
c054ef644eca13e2a8558593bd3a1ac742dc517d
[packages/php-dirs.git] / php-dirs.spec
1 # TODO
2 # - move tmpwatch S: to php-session package (as session files file storage no
3 #   longer can cleanup itself due dir perms)
4 Summary:        Common dirs for different PHP versions
5 Summary(pl.UTF-8):      Wspólne katalogi dla różnych wersji PHP
6 Name:           php-dirs
7 Version:        1.5
8 Release:        2
9 License:        GPL
10 Group:          Base
11 Source0:        php-session.sh
12 BuildRequires:  rpmbuild(macros) >= 1.644
13 Requires(postun):       /usr/sbin/groupdel
14 Requires(pre):  /usr/bin/getgid
15 Requires(pre):  /usr/sbin/groupadd
16 Suggests:       tmpwatch
17 Provides:       group(http)
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 Common directories for PHP version 4 and version 5.
23
24 %description -l pl.UTF-8
25 Wspólne katalogi dla PHP w wersji 4 oraz 5.
26
27 %prep
28
29 %install
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT{%{php_data_dir}/tests,/etc/cron.hourly,/var/{cache,log,run}/php,/var/log/archive/php} \
32         $RPM_BUILD_ROOT%{_docdir}/phpdoc
33
34 install -p %{SOURCE0} $RPM_BUILD_ROOT/etc/cron.hourly
35
36 %clean
37 rm -rf $RPM_BUILD_ROOT
38
39 %pre
40 %groupadd -g 51 http
41
42 %postun
43 if [ "$1" = "0" ]; then
44         %groupremove http
45 fi
46
47 %files
48 %defattr(644,root,root,755)
49 %attr(755,root,root) %{_sysconfdir}/cron.hourly/php-session.sh
50 %dir %{php_data_dir}
51 %dir %{php_data_dir}/tests
52 %dir %{_docdir}/phpdoc
53 %attr(775,root,http) %dir %verify(not group mode) /var/log/php
54 %attr(770,root,root) %dir %verify(not group mode) /var/log/archive/php
55 # no +r, so only predictable names can be used. currently php-soap wsdl cache is there
56 %attr(730,root,http) %dir %verify(not group mode) /var/cache/php
57 # http needs only x for directory (otherwise it knows session file
58 # names and can read it contents)
59 # keep o+x for fcgi.sock (lighttpd)
60 %attr(731,root,http) %dir %verify(not group mode) /var/run/php