2 # - move tmpwatch R: to php-session package (as session files file storage no
3 # longer can cleanup itself due dir perms)
4 # - https://fedorahosted.org/tmpwatch/ticket/7 is implemented in tmpwatch-2.9.16, see 3467603 todo
5 Summary: Common dirs for PHP
6 Summary(pl.UTF-8): Wspólne katalogi dla PHP
12 Source0: php-session.sh
14 BuildRequires: rpmbuild(macros) >= 1.644
15 Requires(postun): /usr/sbin/groupdel
16 Requires(pre): /usr/bin/getgid
17 Requires(pre): /usr/sbin/groupadd
19 Conflicts: php-pear < 4:1.4-2
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _libexecdir %{_prefix}/lib
25 %global debug_package %{nil}
28 Common directories for PHP.
30 %description -l pl.UTF-8
31 Wspólne katalogi dla PHP.
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{/etc/cron.d,/var/{cache,log,run}/php,/var/log/archive/php} \
38 $RPM_BUILD_ROOT%{_docdir}/phpdoc $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/php \
39 $RPM_BUILD_ROOT%{_libexecdir} $RPM_BUILD_ROOT%{php_data_dir}
41 install -p %{SOURCE0} $RPM_BUILD_ROOT%{_libexecdir}
42 sed -e 's,@libexecdir@,%{_libexecdir},' %{SOURCE1} >$RPM_BUILD_ROOT/etc/cron.d/php-session
45 install -d $RPM_BUILD_ROOT$dir
48 %{php_data_dir}/Symfony/Bridge
49 %{php_data_dir}/Symfony/Component
53 rm -rf $RPM_BUILD_ROOT
59 if [ "$1" = "0" ]; then
64 %defattr(644,root,root,755)
65 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/php-session
66 %attr(755,root,root) %{_libexecdir}/php-session.sh
68 %dir %{_docdir}/phpdoc
69 %dir %{_includedir}/php
73 %attr(775,root,http) %dir %verify(not group mode) /var/log/php
74 %attr(770,root,root) %dir %verify(not group mode) /var/log/archive/php
76 # no +r, so only predictable names can be used. currently php-soap wsdl cache is there
77 %attr(730,root,http) %dir %verify(not group mode) /var/cache/php
79 # http needs only +x for directory
80 # (otherwise it knows session file names and can read it contents)
81 # keep o+x for fcgi.sock (lighttpd)
82 %attr(731,root,http) %dir %verify(not group mode) /var/run/php