]> git.pld-linux.org Git - packages/apache1-mod_suphp.git/blame - apache1-mod_suphp.spec
- converted to UTF-8
[packages/apache1-mod_suphp.git] / apache1-mod_suphp.spec
CommitLineData
2459bb24
AG
1#
2# Available build options:
2f710cc9 3%bcond_with checkpath # enable check if php execution is within DOCUMENT_ROOT of the vhost
2459bb24
AG
4#
5%define mod_name suphp
6%define apxs /usr/sbin/apxs1
7Summary: Apache module: suPHP - execute PHP scripts with the permissions of their owners
2ae448b3 8Summary(pl.UTF-8): Moduł do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich właścicieli
2459bb24
AG
9Name: apache1-mod_%{mod_name}
10Version: 0.5.2
2da50204 11Release: 1.12
2459bb24
AG
12License: GPL
13Group: Networking/Daemons
2f710cc9 14Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
2459bb24 15# Source0-md5: 337909e87027af124052baddddbd2994
2f710cc9
ER
16Source1: %{name}.conf
17Source2: %{name}.logrotate
2459bb24 18URL: http://www.suphp.org/
2f710cc9 19BuildRequires: apache1-devel >= 1.3.33-2
2459bb24
AG
20BuildRequires: autoconf
21BuildRequires: automake
2f710cc9
ER
22Requires(triggerpostun): %{apxs}
23Requires(triggerpostun): grep
24Requires(triggerpostun): sed >= 4.0
2459bb24
AG
25Requires: apache
26Requires: php-cgi
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
2f710cc9
ER
29%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
2459bb24
AG
31
32%description
2f710cc9
ER
33suPHP is a tool for executing PHP scripts with the permissions of
34their owners. It consists of an Apache module (mod_suphp) and a setuid
35root binary (suphp) that is called by the Apache module to change the
36uid of the process executing the PHP interpreter.
2459bb24 37
2ae448b3
JR
38%description -l pl.UTF-8
39suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
40uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
41programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
42moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
2459bb24
AG
43
44%prep
45%setup -q -n %{mod_name}-%{version}
46
89962859
ER
47# common GPL license
48rm -f doc/{de,en}/LICENSE
49# common Apache license
50rm -f doc/{de,en}/apache/LICENSE
51
2459bb24
AG
52%build
53%{__aclocal}
54%{__autoconf}
55%{__autoheader}
56chmod 755 configure
57%configure \
58 %{?with_checkpath: --enable-checkpath} \
59 %{!?with_checkpath: --disable-checkpath} \
60 --with-apache-user=http \
61 --with-min-uid=500 \
62 --with-min-gid=1000 \
63 --with-apxs=%{apxs} \
16967cdb 64 --with-php=/usr/bin/php.cgi \
2459bb24 65 --disable-checkuid \
2f710cc9 66 --disable-checkgid
2459bb24
AG
67
68%{__make}
69
70%install
71rm -rf $RPM_BUILD_ROOT
2f710cc9 72install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_sysconfdir}/conf.d}
2459bb24
AG
73
74install src/suphp $RPM_BUILD_ROOT%{_sbindir}
75install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
2f710cc9 76install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
2459bb24
AG
77
78install -d $RPM_BUILD_ROOT/etc/logrotate.d
2f710cc9
ER
79# TODO: apache1-mod_suphp + trigger
80install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
2459bb24
AG
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%post
bc1164b7 86%service -q apache restart
2459bb24 87
f75a3dad 88%postun
2459bb24 89if [ "$1" = "0" ]; then
bc1164b7 90 %service -q apache restart
2459bb24
AG
91fi
92
2f710cc9
ER
93# TODO remove the trigger, if no longer needed
94%triggerpostun -- %{name} <= 0.5.2-1
95if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
96 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
97 sed -i -e '
98 /^Include.*mod_%{mod_name}\.conf/d
99 ' /etc/apache/apache.conf
2da50204 100
bc1164b7 101 %service -q apache restart
2f710cc9
ER
102fi
103
2459bb24
AG
104%files
105%defattr(644,root,root,755)
89962859 106%doc AUTHORS ChangeLog doc/en doc/de
2459bb24
AG
107%attr(4755,root,root) %{_sbindir}/suphp
108%attr(755,root,root) %{_pkglibdir}/*
2f710cc9
ER
109%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
110%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
This page took 0.095221 seconds and 4 git commands to generate.