Sophie

Sophie

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

apache-mod_authenticache-2.0.8-9mdv2009.0.src.rpm

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

Summary:	A generic credential caching module for the apache Web server
Name:		apache-%{mod_name}
Version:	2.0.8
Release:	%mkrel 9
Group:		System/Servers
License:	Apache License
URL:		http://killa.net/infosec/mod_authenticache/
Source0:	http://killa.net/infosec/mod_authenticache/%{mod_name}-%{version}.tar.bz2
Source1:	%{mod_conf}.bz2
Source2:	%{mod_name}-example_files.tar.bz2
Patch0:		mod_authenticache-2.0.8-apache220.diff
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
Epoch:		1
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
%{mod_name} provides a simple and generic method for caching
authentication information on the client side in order to enhance
performance. It has been tested with several Basic HTTP
authentication modules, and has an Apache 2.0.x optional function
exporter for caching credentials from any custom authentication module. 

%prep

%setup -q -n %{mod_name}-%{version} -a2
%patch0 -p0

# fix version string
#perl -pi -e "s|^#define VERSION.*|#define VERSION \"%{version}\"|g" defines.h

# fix strange attribs
chmod 644 *

# fix version string
echo "#define VERSION \"%{version}\"" >> defines.h

# 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_name}.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}

# make the example work... (ugly, but it works...)
NEW_URL=%{_docdir}/%{name}-%{version}/
perl -pi -e "s|_REPLACE_ME_|$NEW_URL|g" %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}
perl -pi -e "s|_REPLACE_ME_|$NEW_URL|g" .htaccess

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 .htaccess .htpasswd index.html
%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:2.0.8-9mdv2009.0
+ Revision: 234697
- rebuild

* Thu Jun 05 2008 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-8mdv2009.0
+ Revision: 215540
- fix rebuild

* Fri Mar 07 2008 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-7mdv2008.1
+ Revision: 181664
- rebuild

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

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sat Sep 08 2007 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-6mdv2008.0
+ Revision: 82528
- rebuild

* Sat Aug 18 2007 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-5mdv2008.0
+ Revision: 65625
- rebuild


* Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 2.0.8-4mdv2007.1
+ Revision: 140631
- rebuild

* Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-3mdv2007.1
+ Revision: 79343
- Import apache-mod_authenticache

* Mon Aug 07 2006 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-3mdv2007.0
- rebuild

* Wed Dec 14 2005 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.8-2mdk
- rebuilt against apache-2.2.0

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

* Sun Jul 31 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.8-2mdk
- fix deps

* Fri Jun 03 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.8-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.0.8-4mdk
- use the %%mkrel 1

* Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.8-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.0.8-2mdk
- spec file cleanups, remove the ADVX-build stuff

* Mon Feb 14 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.8-1mdk
- 2.0.8

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

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

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

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

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