]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blob - apache-mod_suphp.spec
a399bb667aa5647c160563b707e48a92521fdfbc
[packages/apache-mod_suphp.git] / apache-mod_suphp.spec
1 %define         mod_name        suphp
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}
6 Version:        0.3
7 Release:        0.1
8 License:        GPL
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}
16 Requires:       apache
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
20
21 %description
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.
26
27 %description -l pl
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.
32
33 %prep
34 %setup -q -n %{mod_name}-%{version}
35
36 %build
37 %{__aclocal}
38 %{__autoconf}
39 %{__autoheader}
40 %configure \
41         --with-http-user=http \
42         --with-min-uid=500 \
43         --with-min-gid=1000
44
45 %{__make}
46
47 #%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
52
53 install src/suphp $RPM_BUILD_ROOT%{_sbindir}
54 install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %post
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
63 fi
64
65 %preun
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
70         fi
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc README AUTHORS ChangeLog doc
76 %attr(4755,root,root) %{_sbindir}/*
77 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.064393 seconds and 3 git commands to generate.