Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > f58c27eba2b7dad3619fa9a4c5919190 > files > 2

apache-mod_watchcat-1.0-8mdv2009.0.src.rpm

#Module-Specific definitions
%define mod_name mod_watchcat
%define mod_conf 55_%{mod_name}.conf
%define mod_so %{mod_name}.so

Summary:	DSO module for the apache 2 Web server
Name:		apache-%{mod_name}
Version:	1.0
Release:	%mkrel 8
Group:		System/Servers
License:	GPL
URL:		http://oss.digirati.com.br/mod_watchcat/
Source0:	http://oss.digirati.com.br/mod_watchcat/mod_watchcat-%{version}.tar.bz2
Source1:	%{mod_conf}.bz2
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(pre):	apache-conf >= 2.2.0
Requires(pre):	apache >= 2.2.0
Requires:	apache-conf >= 2.2.0
Requires:	apache >= 2.2.0
BuildRequires:	apache-devel >= 2.2.0
BuildRequires:	file
BuildRequires:	libwcat-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
mod_watchcat is a module developed to provide watchcatd-awareness
to the Apache 2 webserver. This allows a system administrator to
set up timeouts for Apache processes, and thus provide protection
against badly coded or malicious scripts. mod_watchcat can be
configured to kill those resource-consuming processes before the
server locks-up.

%prep

%setup -q -n %{mod_name}-%{version}

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build

%{_sbindir}/apxs -c mod_watchcat.c -lwcat

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}/apache-extramodules
install -d %{buildroot}%{_sysconfdir}/httpd/modules.d

install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/
bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}

install -d %{buildroot}%{_var}/www/html/addon-modules
ln -s ../../../..%{_docdir}/%{name}-%{version} %{buildroot}%{_var}/www/html/addon-modules/%{name}-%{version}

%post
if [ -f %{_var}/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart 1>&2;
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f %{_var}/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart 1>&2
    fi
fi

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYRIGHT
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf}
%attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so}
%{_var}/www/html/addon-modules/*




%changelog
* Mon Jul 14 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0-8mdv2009.0
+ Revision: 235127
- rebuild

* Thu Jun 05 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0-7mdv2009.0
+ Revision: 215670
- fix rebuild

* Sun Mar 09 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0-6mdv2008.1
+ Revision: 182875
- rebuild

* Mon Feb 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.0-5mdv2008.1
+ Revision: 170761
- rebuild
- fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sat Sep 08 2007 Oden Eriksson <oeriksson@mandriva.com> 1.0-4mdv2008.0
+ Revision: 82700
- rebuild


* Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 1.0-3mdv2007.1
+ Revision: 140775
- rebuild

* Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0-2mdv2007.0
+ Revision: 79553
- Import apache-mod_watchcat

* Mon Aug 07 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0-2mdv2007.0
- rebuild

* Thu Dec 22 2005 Oden Eriksson <oeriksson@mandriva.com> 1.0-1mdk
- initial Mandriva package
- used parts of the provided spec file