]> git.pld-linux.org Git - packages/php-dirs.git/blob - php-dirs.spec
v1.6: move /usr/share/php subdirs here; cleanup descs
[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 PHP
5 Summary(pl.UTF-8):      Wspólne katalogi dla PHP
6 Name:           php-dirs
7 Version:        1.6
8 Release:        1
9 License:        GPL
10 Group:          Base
11 Source0:        php-session.sh
12 Source1:        %{name}.tmpfiles
13 BuildRequires:  rpmbuild(macros) >= 1.644
14 Requires(postun):       /usr/sbin/groupdel
15 Requires(pre):  /usr/bin/getgid
16 Requires(pre):  /usr/sbin/groupadd
17 Suggests:       tmpwatch
18 Conflicts:      php-pear < 4:1.4-2
19 Provides:       group(http)
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Common directories for PHP.
25
26 %description -l pl.UTF-8
27 Wspólne katalogi dla PHP.
28
29 %prep
30
31 %install
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT{/etc/cron.hourly,/var/{cache,log,run}/php,/var/log/archive/php} \
34         $RPM_BUILD_ROOT%{_docdir}/phpdoc \
35         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
36
37 install -p %{SOURCE0} $RPM_BUILD_ROOT/etc/cron.hourly
38 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
39
40 while read dir; do
41         install -d $RPM_BUILD_ROOT$dir
42 done <<EOF
43 %{php_data_dir}/tests
44 %{php_data_dir}/Symfony/Bridge
45 %{php_data_dir}/Symfony/Component
46 EOF
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %pre
52 %groupadd -g 51 http
53
54 %postun
55 if [ "$1" = "0" ]; then
56         %groupremove http
57 fi
58
59 %files
60 %defattr(644,root,root,755)
61 %{systemdtmpfilesdir}/%{name}.conf
62 %attr(755,root,root) %{_sysconfdir}/cron.hourly/php-session.sh
63 %{php_data_dir}
64
65 %dir %{_docdir}/phpdoc
66 %attr(775,root,http) %dir %verify(not group mode) /var/log/php
67 %attr(770,root,root) %dir %verify(not group mode) /var/log/archive/php
68
69 # no +r, so only predictable names can be used. currently php-soap wsdl cache is there
70 %attr(730,root,http) %dir %verify(not group mode) /var/cache/php
71
72 # http needs only +x for directory
73 # (otherwise it knows session file names and can read it contents)
74 # keep o+x for fcgi.sock (lighttpd)
75 %attr(731,root,http) %dir %verify(not group mode) /var/run/php
This page took 0.078408 seconds and 3 git commands to generate.