]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blob - apache-mod_suphp.spec
- this update is sponsored by Marcin Kurzyna
[packages/apache-mod_suphp.git] / apache-mod_suphp.spec
1 #
2 # Available build options:
3 #  _disable_checkpath   - set to '1' to disable check if php execution is within DOCUMENT_ROOT
4 #                         of the vhost; you want to set it ie. if you use symlinks to directories 
5 #                         that lay outside vhost DOCUMENT_ROOT
6 #
7 #
8 %define         mod_name        suphp
9 %define         apxs            /usr/sbin/apxs
10 Summary:        Apache module: suPHP - execute PHP scripts with the permissions of their owners
11 Summary(pl):    Modu³ do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich w³a¶cicieli
12 Name:           apache-mod_%{mod_name}
13 Version:        0.3.1
14 Release:        0.4
15 License:        GPL
16 Group:          Networking/Daemons
17 Source0:        http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz     
18 # Source0-md5:  edf3063432da532a398d08cc8a48b668
19 Source1:        apache-mod_suphp.logrotate
20 URL:            http://www.suphp.org/
21 BuildRequires:  %{apxs}
22 BuildRequires:  apache-devel <= 1.4
23 Requires(post,preun):   %{apxs}
24 Requires:       apache
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
28
29 %description
30 suPHP is a tool for executing PHP scripts with the permissions of their
31 owners. It consists of an Apache module (mod_suphp) and a setuid root
32 binary (suphp) that is called by the Apache module to change the uid of
33 the process executing the PHP interpreter.
34
35 %description -l pl
36 suPHP jest narzêdziem pozwalaj±cym na wykonywanie skryptów PHP z
37 uprawnieniami ich w³a¶cicieli. Sk³ada siê z modu³u (mod_suphp) oraz
38 programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
39 modu³ w celu zmiany uid procesu uruchamiaj±cego interpreter PHP.
40
41 %prep
42 %setup -q -n %{mod_name}-%{version}
43
44 %build
45 %{__aclocal}
46 %{__autoconf}
47 %{__autoheader}
48 chmod 755 configure
49 %configure --with-apache-user=http \
50         --with-min-uid=500 \
51         --with-min-gid=1000 \
52         --with-apxs=%{apxs} \
53         %{?_disable_checkpath: --enable-checkpath=no}
54
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
60
61 install src/suphp $RPM_BUILD_ROOT%{_sbindir}
62 install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
63
64 install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
65 install --mode=640 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/apache-mod_suphp
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
72 if [ -f /var/lock/subsys/httpd ]; then
73         /etc/rc.d/init.d/httpd restart 1>&2
74 fi
75
76 %preun
77 if [ "$1" = "0" ]; then
78         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
79         if [ -f /var/lock/subsys/httpd ]; then
80                 /etc/rc.d/init.d/httpd restart 1>&2
81         fi
82 fi
83
84 %postun
85 rm -f %{_sysconfdir}/logrotate.d/apache-mod_suphp
86
87 %files
88 %defattr(644,root,root,755)
89 %doc README AUTHORS ChangeLog doc
90 %attr(4755,root,root) %{_sbindir}/*
91 %attr(755,root,root) %{_pkglibdir}/*
92 %config(noreplace) %{_sysconfdir}/logrotate.d/*
This page took 0.081732 seconds and 3 git commands to generate.