Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > 3c636951c2f3e2c0f1b26a0a2c8e63e6 > files > 2

apache-mod_sleep-2.1-4mdv2007.1.src.rpm

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

Summary:	Mod_sleep is a DSO module for the apache web server
Name:		apache-%{mod_name}
Version:	2.1
Release:	%mkrel 4
Group:		System/Servers
License:	BSD-style
URL:		http://www.snert.com/Software/mod_sleep/index.shtml
Source0:	mod_sleep201.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
Provides:	apache2-mod_sleep
Obsoletes:	apache2-mod_sleep
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
This module simply sleeps a fixed length of time every request.
The sleep time can be configured globally, or per <VirtualHost>,
<Directory>, or <Location>. This module serves more as an example
than providing any really useful function, though someone did ask
for it - sort of. 

%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_sleep.c

%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 Img CHANGES* index.shtml mailto.js style.css
%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
* Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 2.1-4mdv2007.1
+ Revision: 140754
- rebuild

* Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 2.1-3mdv2007.0
+ Revision: 79509
- Import apache-mod_sleep



* Sun Aug 06 2006 Oden Eriksson <oeriksson@mandriva.com> 2.1-3mdv2007.0
- rebuild

* Fri Dec 16 2005 Oden Eriksson <oeriksson@mandriva.com> 2.1-2mdk
- rebuilt against apache-2.2.0

* Mon Nov 28 2005 Oden Eriksson <oeriksson@mandriva.com> 2.1-1mdk
- fix versioning

* Sat Jul 30 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.1-2mdk
- fix deps

* Thu Jun 02 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.1-1mdk
- rename the package
- the conf.d directory is renamed to modules.d
- use new rpm-4.4.x pre,post magic

* Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.1-4mdk
- use the %%mkrel 1

* Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.1-3mdk
- fix %%post and %%postun to prevent double restarts
- fix bug #6574

* Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.1-2mdk
- spec file cleanups, remove the ADVX-build stuff

* Tue Feb  8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.1-1mdk
- rebuilt for apache 2.0.53

* Tue Sep 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.1-1mdk
- built for apache 2.0.52

* Thu Sep 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_2.1-1mdk
- built for apache 2.0.51

* Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_2.1-1mdk
- built for apache 2.0.50
- remove redundant provides

* Mon Jun 14 2004 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.49_2.1-1mdk
- built for apache 2.0.49

* Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.48_2.1-1mdk
- built for apache 2.0.48

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_2.1-1mdk
- rebuilt against latest apache2, requires and buildrequires

* Sat May 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.46_2.1-1mdk
- rebuilt for apache v2.0.46
- buildprereq ADVX-build >= 9.2

* Tue Apr 08 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.45_2.1-1mdk
- cosmetic rebuild for apache v2.0.45 

* Sat Feb 22 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0.44_2.1-2mdk
- commented out the directives in the cofiguration file, otherwise if people
  install this module without thinking about it, their webserver will become
  slow as hell!

* Tue Jan 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.44_2.1-1mdk
- rebuilt for apache v2.0.44

* Mon Jan 20 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_2.1-4mdk
- fix buildrequires apache-devel >= 2.0.53-1mdk, as 
  pointed out by Olivier Thauvin

* Sat Jan 18 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_2.1-3mdk
- rebuilt against rebuilt buildrequires

* Mon Jan 13 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_2.1-2mdk
- Rebuilt with the new apache-devel that uses /usr/sbin/apxs2 and
  /usr/include/apache2

* Tue Nov 12 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_2.1-1mdk
- initial cooker contrib (no patch required!)