]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blob - apache-mod_suphp.spec
4592a925a33bf5a630e474270c187edd035c83fd
[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 %{__make}
42
43 #%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
48
49 install src/suphp $RPM_BUILD_ROOT%{_sbindir}
50 install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
57 if [ -f /var/lock/subsys/httpd ]; then
58         /etc/rc.d/init.d/httpd restart 1>&2
59 fi
60
61 %preun
62 if [ "$1" = "0" ]; then
63         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
64         if [ -f /var/lock/subsys/httpd ]; then
65                 /etc/rc.d/init.d/httpd restart 1>&2
66         fi
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc README AUTHORS ChangeLog doc
72 %attr(4755,root,root) %{_sbindir}/*
73 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.046434 seconds and 3 git commands to generate.