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