Blob Blame History Raw
Name:           dansguardian
Version:        2.10.1.1
Release:        1%{?dist}
Summary:        Content filtering web proxy
Summary(de):    Contentfilter-Proxy

Group:          System Environment/Daemons
# upstream dual-licenses this with GPLv2+ and an own license
# for us GPLv2+ applies as stated on http://dansguardian.org/?page=copyright2
# citation:
#    freely (no cost) downloadable from this site for general purpose unix
#    distributions like FreeBSD, Debian, Fedora, Ubuntu, etc
License:        GPLv2+
URL:            http://www.dansguardian.org/
Source0:        http://dansguardian.org/downloads/2/Stable/%{name}-%{version}.tar.gz
Source1:        dansguardian.init
Source2:        dansguardian.httpd
# This patch removes the upstream restrictions on the GPLv2+ source
Patch0:         dansguardian-copyright-notice.patch
# Fixes some compilation errors with gcc 4.4
Patch1:         dansguardian-gcc44.patch
# Adds support for ClamAV > 0.95
Patch2:         dansguardian-clamav095.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  clamav-devel pcre-devel zlib-devel
BuildRequires:  pkgconfig
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts


%description
DansGuardian filters the content of pages based on many methods including
phrase matching, PICS filtering and URL filtering. It does not purely filter
based on a banned list of sites.

It provides real-time virus scanning capabilities for content access.

DansGuardian is designed to be completely flexible and allows you to tailor the
filtering to your exact needs. It can be as draconian or as unobstructive as
you want. The default settings are geared towards what a primary school might
want but DansGuardian puts you in control of what you want to block.

DansGuardian requires squid or another similar caching proxy server on your
local network.

%description(de)
DansGuardian filtert den Content einer Webseite basierend auf verschiedenen
Methoden wie beispielsweise Wortfilter, PICS filtering und URL filtering. Es
handelt sich also um ein echtes Content filtering anstatt einfacher Blacklists.

Außerdem bietet DansGuardian die Möglichkeit einen Virenfilter einzubinden.

DansGuardian wurde darauf ausgelegt so flexibel wie möglich zu sein und
erlaubt es die Filterregeln exakt auf die eigenen Bedürfnisse anzupassen.
Vorgegeben sind Einstellungen die dem Bedarf einer Grundschule entsprechen.

DansGuardian benötigt squid oder einen ähnlichen Caching-Proxy-Server im
lokalen Netzwerk.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i 's|@DGCONFDIR@/lists/|@DGDATADIR@/lists/|' configs/%{name}*.conf.in


%build
%configure --enable-orig-ip \
   --enable-clamav \
   --enable-clamd \
   --enable-icap \
   --enable-kavd \
   --enable-commandline \
   --enable-trickledm \
   --enable-ntlm \
   --enable-email

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -Dpm 644 $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/%{name} \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
# delete the other scripts since they are of no use for Fedora users
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts
chmod 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.pl

# move the lists to the datadir, since they really are data
mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/lists \
    $RPM_BUILD_ROOT%{_datadir}/%{name}

# install init script and httpd config
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -Dp -m0644 %{SOURCE2} \
    $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf

# we'll install this later within %doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}

%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/chkconfig --add %{name}


%preun
if [ $1 = 0 ] ; then
    /sbin/service %{name} stop >/dev/null 2>&1
    /sbin/chkconfig --del %{name}
fi


%postun
if [ "$1" -ge "1" ] ; then
    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc COPYING INSTALL README UPGRADING
%doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ
%doc doc/FAQ.html doc/Plugins
%doc %{_mandir}/man?/*
%{_sbindir}/%{name}
%{_datadir}/%{name}
%{_initrddir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}*.conf
%dir %{_sysconfdir}/%{name}/authplugins
%config(noreplace) %{_sysconfdir}/%{name}/authplugins/*
%dir %{_sysconfdir}/%{name}/contentscanners
%config(noreplace) %{_sysconfdir}/%{name}/contentscanners/*
%dir %{_sysconfdir}/%{name}/downloadmanagers
%config(noreplace) %{_sysconfdir}/%{name}/downloadmanagers/*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf



%changelog
* Wed Jul 15 2009 Felix Kaechele <heffer@fedoraproject.org> - 2.10.1.1-1
- news upstream version

* Fri May 29 2009 Felix Kaechele <heffer@fedoraproject.org> - 2.10.0.3-2
- added licensing information

* Sat May 09 2009 Felix Kaechele <heffer@fedoraproject.org> - 2.10.0.3-1
- initial build