]> git.pld-linux.org Git - packages/apache1-mod_suphp.git/blame - apache1-mod_suphp.spec
- use apache1(EAPI) for runtime dep
[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
626f4d51 8Summary(pl.UTF-8): Moduł do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich właścicieli
2459bb24 9Name: apache1-mod_%{mod_name}
d9dee5ee 10Version: 0.6.1
0626a4a3 11Release: 2
2459bb24
AG
12License: GPL
13Group: Networking/Daemons
2f710cc9 14Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
8578b27a 15# Source0-md5: 7eb8ae29404392d9eb07c69d5242d716
d9dee5ee
JB
16Source1: %{name}.logrotate
17Source2: %{name}.conf
18Source2: %{name}-suphp.conf
19Patch0: %{name}-apr.patch
20Patch1: %{name}-notallowed.patch
2459bb24 21URL: http://www.suphp.org/
bd8ad244 22BuildRequires: apache1-devel >= 1.3.39
2459bb24
AG
23BuildRequires: autoconf
24BuildRequires: automake
d9dee5ee
JB
25BuildRequires: libstdc++-devel
26BuildRequires: rpmbuild(macros) >= 1.268
0626a4a3 27Requires: apache1(EAPI)
2459bb24 28Requires: php-cgi
a9d394eb 29Conflicts: logrotate < 3.7-4
2459bb24
AG
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
2f710cc9
ER
32%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
33%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
2459bb24
AG
34
35%description
2f710cc9
ER
36suPHP is a tool for executing PHP scripts with the permissions of
37their owners. It consists of an Apache module (mod_suphp) and a setuid
38root binary (suphp) that is called by the Apache module to change the
39uid of the process executing the PHP interpreter.
2459bb24 40
2ae448b3
JR
41%description -l pl.UTF-8
42suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
43uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
44programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
45moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
2459bb24
AG
46
47%prep
48%setup -q -n %{mod_name}-%{version}
d9dee5ee
JB
49%patch0 -p1
50%patch1 -p1
89962859 51
2459bb24
AG
52%build
53%{__aclocal}
54%{__autoconf}
55%{__autoheader}
d9dee5ee 56%{__automake}
3ca501a2 57export APACHE_VERSION=$(rpm -q --qf '%{V}' apache1-devel)
2459bb24
AG
58%configure \
59 %{?with_checkpath: --enable-checkpath} \
60 %{!?with_checkpath: --disable-checkpath} \
61 --with-apache-user=http \
62 --with-min-uid=500 \
63 --with-min-gid=1000 \
64 --with-apxs=%{apxs} \
65 --disable-checkuid \
d9dee5ee
JB
66 --disable-checkgid \
67 --with-setid-mode=owner \
68 --with-logfile=/var/log/apache/suphp_log
2459bb24
AG
69
70%{__make}
71
72%install
73rm -rf $RPM_BUILD_ROOT
2f710cc9 74install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_sysconfdir}/conf.d}
2459bb24
AG
75
76install src/suphp $RPM_BUILD_ROOT%{_sbindir}
d9dee5ee
JB
77install src/apache/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
78install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
79install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
2459bb24
AG
80
81install -d $RPM_BUILD_ROOT/etc/logrotate.d
3ca501a2 82install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache1-mod_suphp
2459bb24
AG
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%post
bc1164b7 88%service -q apache restart
2459bb24 89
f75a3dad 90%postun
2459bb24 91if [ "$1" = "0" ]; then
bc1164b7 92 %service -q apache restart
2459bb24
AG
93fi
94
95%files
96%defattr(644,root,root,755)
d9dee5ee 97%doc AUTHORS ChangeLog README doc
2459bb24 98%attr(4755,root,root) %{_sbindir}/suphp
d9dee5ee 99%attr(755,root,root) %{_pkglibdir}/*.so
2f710cc9
ER
100%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
101%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
d9dee5ee 102%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{mod_name}.conf
This page took 0.046374 seconds and 4 git commands to generate.