]> git.pld-linux.org Git - packages/apache-mod_suphp.git/blobdiff - apache-mod_suphp.spec
update to 0.7.2
[packages/apache-mod_suphp.git] / apache-mod_suphp.spec
index ba4a4e40fb2a23c3ae8cb7a661b764f9b7d0535a..7098f79893abca8779661b1d805b4c74be7b5676 100644 (file)
 #
 # Available build options:
-%bcond_with    checkpath       # enable check if php execution is within
-                               # DOCUMENT_ROOT of the vhost
-#
+%bcond_with    checkpath       # enable check if php execution is within DOCUMENT_ROOT of the vhost
+
 %define                mod_name        suphp
 %define        apxs            /usr/sbin/apxs
 Summary:       Apache module: suPHP - execute PHP scripts with the permissions of their owners
-Summary(pl):   Modu³ do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich w³a¶cicieli
+Summary(pl.UTF-8):     Moduł do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich właścicieli
 Name:          apache-mod_%{mod_name}
-Version:       0.5.2
-Release:       4
+Version:       0.7.2
+Release:       1
 License:       GPL
-Group:         Networking/Daemons
-Source0:       http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz     
-# Source0-md5: 337909e87027af124052baddddbd2994
+Group:         Networking/Daemons/HTTP
+Source0:       http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
+# Source0-md5: 852793953eec97f4ae992e366b517e81
 Source1:       %{name}.logrotate
 Source2:       %{name}.conf
-Patch0:                %{name}-apr.patch
+Source3:       %{name}-suphp.conf
+Patch0:                %{name}-compiler-flags.patch
+Patch1:                %{name}-apache_version.patch
+Patch2:                automake-1.13.patch
 URL:           http://www.suphp.org/
 BuildRequires: %{apxs}
-BuildRequires: apache-devel >= 2
+BuildRequires: apache-devel >= 2.0.52-2
 BuildRequires: autoconf
 BuildRequires: automake
-Requires(post,preun):  %{apxs}
-Requires:      apache >= 2
-Requires:      php-cgi
+BuildRequires: libstdc++-devel
+BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires:      apache(modules-api) = %apache_modules_api
+Requires:      php(cgi)
+Conflicts:     logrotate < 3.7-4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                apacheconfdir   %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
+%define                apachelibdir    %(%{apxs} -q LIBEXECDIR 2>/dev/null)
 
 %description
-suPHP is a tool for executing PHP scripts with the permissions of their
-owners. It consists of an Apache module (mod_suphp) and a setuid root
-binary (suphp) that is called by the Apache module to change the uid of
-the process executing the PHP interpreter.
+suPHP is a tool for executing PHP scripts with the permissions of
+their owners. It consists of an Apache module (mod_suphp) and a setuid
+root binary (suphp) that is called by the Apache module to change the
+uid of the process executing the PHP interpreter.
 
-%description -l pl
-suPHP jest narzêdziem pozwalaj±cym na wykonywanie skryptów PHP z
-uprawnieniami ich w³a¶cicieli. Sk³ada siê z modu³u (mod_suphp) oraz
-programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
-modu³ w celu zmiany uid procesu uruchamiaj±cego interpreter PHP.
+%description -l pl.UTF-8
+suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
+uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
+programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
+moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
 
 %prep
 %setup -q -n %{mod_name}-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
+%{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
-chmod 755 configure
+%{__automake}
+APACHE_VERSION=$(rpm -q --qf '%{V}' apache-devel); export APACHE_VERSION
 %configure \
-       %{?with_checkpath: --enable-checkpath} \
-       %{!?with_checkpath: --disable-checkpath} \
+       --%{?with_checkpath:en}%{!?with_checkpath:dis}able-checkpath \
        --with-apache-user=http \
        --with-min-uid=500 \
        --with-min-gid=1000 \
        --with-apxs=%{apxs} \
-       --disable-checkuid \
-       --disable-checkgid 
+       --with-apr=%{_bindir}/apr-1-config \
+       --with-setid-mode=owner \
+       --with-logfile=/var/log/httpd/suphp_log
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}}
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{apachelibdir},%{_datadir}/suphp}
+install -d $RPM_BUILD_ROOT%{apacheconfdir}
 
-install src/suphp $RPM_BUILD_ROOT%{_sbindir}
-install src/apache2/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod-suphp.conf
+install -p src/suphp $RPM_BUILD_ROOT%{_sbindir}
+install -p src/apache2/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{apachelibdir}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/70_mod_%{mod_name}.conf
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
 
 install -d $RPM_BUILD_ROOT/etc/logrotate.d
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
+cp -p doc/suphp.conf-example $RPM_BUILD_ROOT%{_datadir}/suphp
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc README AUTHORS ChangeLog doc
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_%{mod_name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{mod_name}.conf
+%attr(755,root,root) %{apachelibdir}/*.so
 %attr(4755,root,root) %{_sbindir}/suphp
-%attr(755,root,root) %{_pkglibdir}/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
+%dir %{_datadir}/suphp
+%{_datadir}/suphp/*
This page took 0.090045 seconds and 4 git commands to generate.