]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blame_incremental - apache-mod_suphp.spec
update to 0.7.2
[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.7.2
11Release: 1
12License: GPL
13Group: Networking/Daemons/HTTP
14Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
15# Source0-md5: 852793953eec97f4ae992e366b517e81
16Source1: %{name}.logrotate
17Source2: %{name}.conf
18Source3: %{name}-suphp.conf
19Patch0: %{name}-compiler-flags.patch
20Patch1: %{name}-apache_version.patch
21Patch2: automake-1.13.patch
22URL: http://www.suphp.org/
23BuildRequires: %{apxs}
24BuildRequires: apache-devel >= 2.0.52-2
25BuildRequires: autoconf
26BuildRequires: automake
27BuildRequires: libstdc++-devel
28BuildRequires: libtool
29BuildRequires: rpmbuild(macros) >= 1.268
30Requires: apache(modules-api) = %apache_modules_api
31Requires: php(cgi)
32Conflicts: logrotate < 3.7-4
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
36%define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
37
38%description
39suPHP is a tool for executing PHP scripts with the permissions of
40their owners. It consists of an Apache module (mod_suphp) and a setuid
41root binary (suphp) that is called by the Apache module to change the
42uid of the process executing the PHP interpreter.
43
44%description -l pl.UTF-8
45suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
46uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
47programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
48moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
49
50%prep
51%setup -q -n %{mod_name}-%{version}
52%patch0 -p1
53%patch1 -p1
54%patch2 -p1
55
56%build
57%{__libtoolize}
58%{__aclocal}
59%{__autoconf}
60%{__autoheader}
61%{__automake}
62APACHE_VERSION=$(rpm -q --qf '%{V}' apache-devel); export APACHE_VERSION
63%configure \
64 --%{?with_checkpath:en}%{!?with_checkpath:dis}able-checkpath \
65 --with-apache-user=http \
66 --with-min-uid=500 \
67 --with-min-gid=1000 \
68 --with-apxs=%{apxs} \
69 --with-apr=%{_bindir}/apr-1-config \
70 --with-setid-mode=owner \
71 --with-logfile=/var/log/httpd/suphp_log
72
73%{__make}
74
75%install
76rm -rf $RPM_BUILD_ROOT
77install -d $RPM_BUILD_ROOT{%{_sbindir},%{apachelibdir},%{_datadir}/suphp}
78install -d $RPM_BUILD_ROOT%{apacheconfdir}
79
80install -p src/suphp $RPM_BUILD_ROOT%{_sbindir}
81install -p src/apache2/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{apachelibdir}
82cp -p %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/70_mod_%{mod_name}.conf
83cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
84
85install -d $RPM_BUILD_ROOT/etc/logrotate.d
86cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
87cp -p 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) %{apacheconfdir}/*_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) %{apachelibdir}/*.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.202475 seconds and 5 git commands to generate.