]> git.pld-linux.org Git - packages/php-dirs.git/blobdiff - php-dirs.spec
- ver 1.8. use ls to find possible php commands
[packages/php-dirs.git] / php-dirs.spec
index 5d3b05ab675d2f35b15167d2aff5dcf5fb4f424d..6a303b0bf2fdc1d1f357a1354384efc9e14819d7 100644 (file)
@@ -1,33 +1,55 @@
-Summary:       Common dirs for different PHP versions
-Summary(pl.UTF-8):     Wspólne katalogi dla różnych wersji PHP
+# TODO
+# - move tmpwatch S: to php-session package (as session files file storage no
+#   longer can cleanup itself due dir perms)
+# - https://fedorahosted.org/tmpwatch/ticket/7 is implemented in tmpwatch-2.9.16, see 3467603 todo
+Summary:       Common dirs for PHP
+Summary(pl.UTF-8):     Wspólne katalogi dla PHP
 Name:          php-dirs
-Version:       1.1
-Release:       6
+Version:       1.8
+Release:       1
 License:       GPL
 Group:         Base
 Source0:       php-session.sh
-BuildRequires: rpmbuild(macros) >= 1.461
+Source1:       %{name}.tmpfiles
+Source2:       crontab
+BuildRequires: rpmbuild(macros) >= 1.644
 Requires(postun):      /usr/sbin/groupdel
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
+Suggests:      tmpwatch
+Conflicts:     php-pear < 4:1.4-2
 Provides:      group(http)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _libexecdir     %{_prefix}/lib
+
 %description
-Common directories for PHP version 4 and version 5.
+Common directories for PHP.
 
 %description -l pl.UTF-8
-Wspólne katalogi dla PHP w wersji 4 oraz 5.
+Wspólne katalogi dla PHP.
 
 %prep
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{php_data_dir}/tests,/etc/cron.hourly,/var/run/php}
-install -d $RPM_BUILD_ROOT%{_docdir}/phpdoc
+install -d $RPM_BUILD_ROOT{/etc/cron.d,/var/{cache,log,run}/php,/var/log/archive/php} \
+       $RPM_BUILD_ROOT%{_docdir}/phpdoc \
+       $RPM_BUILD_ROOT%{_libexecdir} \
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+
+install -p %{SOURCE0} $RPM_BUILD_ROOT%{_libexecdir}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/php-session
 
-install %{SOURCE0} $RPM_BUILD_ROOT/etc/cron.hourly
+while read dir; do
+       install -d $RPM_BUILD_ROOT$dir
+done <<EOF
+%{php_data_dir}/tests
+%{php_data_dir}/Symfony/Bridge
+%{php_data_dir}/Symfony/Component
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -42,10 +64,19 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%dir %{php_data_dir}
-%dir %{php_data_dir}/tests
+%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/php-session
+%{systemdtmpfilesdir}/%{name}.conf
+%attr(755,root,root) %{_libexecdir}/php-session.sh
+%{php_data_dir}
+
 %dir %{_docdir}/phpdoc
-# http needs only x for directory (otherwise it knows session file
-# names and can read it contents)
-%attr(730,root,http) %dir %verify(not group mode) /var/run/php
-%attr(755,root,root) %{_sysconfdir}/cron.hourly/php-session.sh
+%attr(775,root,http) %dir %verify(not group mode) /var/log/php
+%attr(770,root,root) %dir %verify(not group mode) /var/log/archive/php
+
+# no +r, so only predictable names can be used. currently php-soap wsdl cache is there
+%attr(730,root,http) %dir %verify(not group mode) /var/cache/php
+
+# http needs only +x for directory
+# (otherwise it knows session file names and can read it contents)
+# keep o+x for fcgi.sock (lighttpd)
+%attr(731,root,http) %dir %verify(not group mode) /var/run/php
This page took 0.070278 seconds and 4 git commands to generate.