2 %define apxs /usr/sbin/apxs
3 Summary: Apache module: suPHP - execute PHP scripts with the permissions of their owners
4 Summary(pl): Modu³ do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich w³a¶cicieli
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
11 # Source0-md5: f80d54de6aff5db4ab76670f1c5b3c6d
12 URL: http://www.suphp.org/
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel <= 1.4
15 Requires(post,preun): %{apxs}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
22 suPHP is a tool for executing PHP scripts with the permissions of their
23 owners. It consists of an Apache module (mod_suphp) and a setuid root
24 binary (suphp) that is called by the Apache module to change the uid of
25 the process executing the PHP interpreter.
28 suPHP jest narzêdziem pozwalaj±cym na wykonywanie skryptów PHP z
29 uprawnieniami ich w³a¶cicieli. Sk³ada siê z modu³u (mod_suphp) oraz
30 programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
31 modu³ w celu zmiany uid procesu uruchamiaj±cego interpreter PHP.
34 %setup -q -n %{mod_name}-%{version}
41 --with-http-user=http \
47 #%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
53 install src/suphp $RPM_BUILD_ROOT%{_sbindir}
54 install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
57 rm -rf $RPM_BUILD_ROOT
60 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
61 if [ -f /var/lock/subsys/httpd ]; then
62 /etc/rc.d/init.d/httpd restart 1>&2
66 if [ "$1" = "0" ]; then
67 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
68 if [ -f /var/lock/subsys/httpd ]; then
69 /etc/rc.d/init.d/httpd restart 1>&2
74 %defattr(644,root,root,755)
75 %doc README AUTHORS ChangeLog doc
76 %attr(4755,root,root) %{_sbindir}/*
77 %attr(755,root,root) %{_pkglibdir}/*