]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blame - apache-mod_suphp.spec
- C: logrotate < 3.7.4 due to archiv -> archive transition
[packages/apache-mod_suphp.git] / apache-mod_suphp.spec
CommitLineData
9416cacc
AG
1#
2# Available build options:
4f71446b 3%bcond_with checkpath # enable check if php execution is within DOCUMENT_ROOT of the vhost
9416cacc 4#
f728b606
AG
5%define mod_name suphp
6%define apxs /usr/sbin/apxs
7Summary: Apache module: suPHP - execute PHP scripts with the permissions of their owners
dd7674a9 8Summary(pl.UTF-8): Moduł do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich właścicieli
f728b606 9Name: apache-mod_%{mod_name}
e2195df5 10Version: 0.6.1
e5964759 11Release: 1
f728b606
AG
12License: GPL
13Group: Networking/Daemons
3c364514 14Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
e2195df5 15# Source0-md5: 7eb8ae29404392d9eb07c69d5242d716
80f911b6 16Source1: %{name}.logrotate
17Source2: %{name}.conf
e5964759 18Source3: %{name}-suphp.conf
fc2af1ea 19Patch0: %{name}-apr.patch
630dd324 20Patch1: %{name}-compiler-flags.patch
4f71446b 21Patch2: %{name}-apache_version.patch
f728b606 22URL: http://www.suphp.org/
a5f28e33 23BuildRequires: apache-apxs >= 2.0.52-2
cdd38411 24BuildRequires: apache-devel >= 2.0.52-2
18fcd50c
JB
25BuildRequires: autoconf
26BuildRequires: automake
6577b666 27BuildRequires: libstdc++-devel
61194e06 28BuildRequires: rpmbuild(macros) >= 1.268
4f71446b 29Requires: apache(modules-api) = %apache_modules_api
987c9698 30Requires: php-cgi
8825cc8e 31Conflicts: logrotate < 3.7.4
f728b606
AG
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
4f71446b
ER
34%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
35%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
f728b606
AG
36
37%description
3c364514
AG
38suPHP is a tool for executing PHP scripts with the permissions of
39their owners. It consists of an Apache module (mod_suphp) and a setuid
40root binary (suphp) that is called by the Apache module to change the
41uid of the process executing the PHP interpreter.
f728b606 42
e45c9df2
JR
43%description -l pl.UTF-8
44suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
45uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
46programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
47moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
f728b606
AG
48
49%prep
50%setup -q -n %{mod_name}-%{version}
fc2af1ea 51%patch0 -p1
72e21711 52%patch1 -p1
4f71446b 53%patch2 -p1
f728b606
AG
54
55%build
56%{__aclocal}
57%{__autoconf}
58%{__autoheader}
72e21711 59%{__automake}
4f71446b 60export APACHE_VERSION=$(rpm -q --qf '%%{version}' apache-apxs)
18fcd50c 61%configure \
762229de
AM
62 %{?with_checkpath: --enable-checkpath} \
63 %{!?with_checkpath: --disable-checkpath} \
18fcd50c 64 --with-apache-user=http \
48cd0203 65 --with-min-uid=500 \
9416cacc
AG
66 --with-min-gid=1000 \
67 --with-apxs=%{apxs} \
762229de 68 --disable-checkuid \
e5964759
JR
69 --disable-checkgid \
70 --with-setid-mode=owner \
71 --with-logfile=/var/log/httpd/suphp_log
48cd0203 72
f728b606
AG
73%{__make}
74
f728b606
AG
75%install
76rm -rf $RPM_BUILD_ROOT
630dd324 77install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_datadir}/suphp}
80f911b6 78install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
f728b606 79
e78edc9b 80install src/suphp $RPM_BUILD_ROOT%{_sbindir}
39cfdd8f 81install src/apache2/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
96582c5b 82install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf
e5964759 83install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
f728b606 84
18fcd50c
JB
85install -d $RPM_BUILD_ROOT/etc/logrotate.d
86install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
9416cacc 87
630dd324
MG
88install doc/suphp.conf-example $RPM_BUILD_ROOT%{_datadir}/suphp
89
f728b606
AG
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%post
61194e06 94%service -q httpd restart
f728b606 95
3057f748 96%postun
f728b606 97if [ "$1" = "0" ]; then
61194e06 98 %service -q httpd restart
f728b606
AG
99fi
100
101%files
102%defattr(644,root,root,755)
103%doc README AUTHORS ChangeLog doc
96582c5b 104%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
e5964759 105%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{mod_name}.conf
96582c5b 106%attr(755,root,root) %{_pkglibdir}/*.so
f9a8a397 107%attr(4755,root,root) %{_sbindir}/suphp
3c364514 108%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
4f71446b 109%dir %{_datadir}/suphp
630dd324 110%{_datadir}/suphp/*
This page took 0.145931 seconds and 4 git commands to generate.