]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blob - apache-mod_suphp.spec
f938999fea3344c59dc5666d40d67937a648d160
[packages/apache-mod_suphp.git] / apache-mod_suphp.spec
1 #
2 # Available build options:
3 #  with_checkpath       - enable check if php execution is within DOCUMENT_ROOT
4 #                         of the vhost
5 #
6 %define         mod_name        suphp
7 %define         apxs            /usr/sbin/apxs
8 Summary:        Apache module: suPHP - execute PHP scripts with the permissions of their owners
9 Summary(pl):    Modu³ do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich w³a¶cicieli
10 Name:           apache-mod_%{mod_name}
11 Version:        0.3.1
12 Release:        0.5
13 License:        GPL
14 Group:          Networking/Daemons
15 Source0:        http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz     
16 # Source0-md5:  edf3063432da532a398d08cc8a48b668
17 Source1:        apache-mod_suphp.logrotate
18 URL:            http://www.suphp.org/
19 BuildRequires:  %{apxs}
20 BuildRequires:  apache-devel <= 1.4
21 BuildRequires:  autoconf
22 BuildRequires:  automake
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 \
50         %{?with_checkpath: --enable-checkpath} \
51         %{!?with_checkpath: --disable-checkpath} \
52         --with-apache-user=http \
53         --with-min-uid=500 \
54         --with-min-gid=1000 \
55         --with-apxs=%{apxs} \
56         --disable-checkuid \
57         --disable-checkgid
58
59 %{__make}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
64
65 install src/suphp $RPM_BUILD_ROOT%{_sbindir}
66 install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
67
68 install -d $RPM_BUILD_ROOT/etc/logrotate.d
69 install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
76 if [ -f /var/lock/subsys/httpd ]; then
77         /etc/rc.d/init.d/httpd restart 1>&2
78 fi
79
80 %preun
81 if [ "$1" = "0" ]; then
82         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
83         if [ -f /var/lock/subsys/httpd ]; then
84                 /etc/rc.d/init.d/httpd restart 1>&2
85         fi
86 fi
87
88 %files
89 %defattr(644,root,root,755)
90 %doc README AUTHORS ChangeLog doc
91 %attr(4755,root,root) %{_sbindir}/*
92 %attr(755,root,root) %{_pkglibdir}/*
93 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
This page took 0.688485 seconds and 2 git commands to generate.