Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 7ead3f9e1274bf3121295c448ec79f9a > files > 2

apache2-mod_dnsbl-2.0.53_0.10-4mdk.src.rpm

#Module-Specific definitions
%define mod_version 0.10
%define mod_name mod_dnsbl
%define mod_conf A30_%{mod_name}.conf
%define mod_so %{mod_name}.so
%define sourcename %{mod_name}-%{mod_version}

%define apache_version 2.0.53

# Standard Module Definitions
%define name apache2-%{mod_name}
%define version %{apache_version}_%{mod_version}

Summary:	Mod_dnsbl is a blacklisting DSO for apache2 using DNS lookups
Name:		%{name}
Version:	%{version}
Release:	%mkrel 4
Group:		System/Servers
License:	GPL
URL:		http://software.othello.ch/mod_dnsbl/
Source0:	%{sourcename}.tar.bz2
Source1:	%{mod_conf}.bz2
Patch0:		mod_dnsbl-0.10-compile_fix.diff.bz2
Prereq:		rpm-helper
Prereq:		apache2 >= %{apache_version}
Prereq:		apache2-conf
BuildRequires:	apache2-devel >= %{apache_version}-1mdk
BuildRequires:	automake1.7
BuildRequires:	autoconf2.5
BuildRequires:  file
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
mod_dnsbl is a blacklisting module for the apache proxy.  It uses
the DNS as a distributed database for blacklist data. In addition
to simple block/pass decisions, it can also override
authentication or virus scanning with mod_clamav. Furthermore,
such rules can be dependent on time.

%prep

%setup -q -n %{sourcename}
%patch0 -p0

# 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
export WANT_AUTOCONF_2_5=1
rm -f configure
libtoolize --copy --force && aclocal-1.7 && automake-1.7 --add-missing --copy && autoconf --force

%configure2_5x \
    --with-apxs=%{_sbindir}/apxs2

%make

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

install -d %{buildroot}%{_libdir}/apache2-extramodules
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_mandir}/man8

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

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

install -m0755 dnsbl_redirector %{buildroot}%{_sbindir}/
install -m0644 rules %{buildroot}%{_sysconfdir}/dnsbl_redirector.rules
install -m0644 dnsbl_redirector.8 %{buildroot}%{_mandir}/man8/

install -m0755 blacklist2zone %{buildroot}%{_sbindir}/

%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 AUTHORS ChangeLog INSTALL NEWS README mod_dnsbl.css mod_dnsbl.html sample.config
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{mod_conf}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/dnsbl_redirector.rules
%attr(0755,root,root) %{_sbindir}/dnsbl_redirector
%attr(0755,root,root) %{_sbindir}/blacklist2zone
%attr(0644,root,root) %{_mandir}/man8/dnsbl_redirector.8*
%attr(0755,root,root) %{_libdir}/apache2-extramodules/%{mod_so}
%{_var}/www/html/addon-modules/*

%changelog
* Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.10-4mdk
- use the %%mkrel macro

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

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

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

* Fri Nov 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_0.10-1mdk
- initial mandrake package