From: Marcin Krol Date: Mon, 13 Nov 2017 12:46:33 +0000 (+0000) Subject: - merged 1.7 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=b8e003621b4c69250f11c33cbaa2184e6ab12752;p=packages%2Fphp-dirs.git - merged 1.7 from PLD --- diff --git a/crontab b/crontab new file mode 100644 index 0000000..c5d1969 --- /dev/null +++ b/crontab @@ -0,0 +1,3 @@ +MAILTO=root + +01 * * * * root /usr/lib/php-session.sh diff --git a/php-dirs.spec b/php-dirs.spec index c054ef6..149ce49 100644 --- a/php-dirs.spec +++ b/php-dirs.spec @@ -1,37 +1,52 @@ # TODO # - move tmpwatch S: to php-session package (as session files file storage no # longer can cleanup itself due dir perms) -Summary: Common dirs for different PHP versions -Summary(pl.UTF-8): Wspólne katalogi dla różnych wersji PHP +# - 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.5 -Release: 2 +Version: 1.7 +Release: 1 License: GPL Group: Base Source0: php-session.sh +Source1: 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/{cache,log,run}/php,/var/log/archive/php} \ - $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} + +install -p %{SOURCE0} $RPM_BUILD_ROOT%{_libexecdir} +cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/php-session -install -p %{SOURCE0} $RPM_BUILD_ROOT/etc/cron.hourly +while read dir; do + install -d $RPM_BUILD_ROOT$dir +done <