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