%define new_name dansguardian Summary: A content filtering web proxy. Name: DansGuardian Version: 2.2.7 Release: 1mdk License: GPL Group: System/Servers Source0: http://www.dansguardian.org/downloads/2/%{name}-%{version}-0.source.tar.bz2 Source1: %{new_name}.init Patch0: DansGuardian-2.2.3-64bit.patch.bz2 Patch1: DansGuardian-2.2.5-running.patch.bz2 Url: http://www.dansguardian.org BuildRoot: %{_tmppath}/%{new_name}-buildroot BuildRequires: bison BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: python BuildRequires: rpm-build BuildRequires: zlib-devel Requires: apache-common %description DansGuardian is a filtering proxy for Linux, FreeBSD, OpenBSD and Solaris. It filters using multiple methods. These methods include URL and domain filtering, content phrase filtering, PICS filtering, MIME filtering, file extension filtering, POST filtering. The content phrase filtering will check for pages that contain profanities and phrases often associated with pornography and other undesirable content. The POST filtering allows you to block or limit web upload. The URL and domain filtering is able to handle huge lists and is significantly faster than squidGuard. The filtering has configurable domain, user and ip exception lists. SSL Tunneling is supported. %prep %setup -q %patch0 -p1 %patch1 -p1 #cd %{name}-%{version} #make clean %build #cd %{name}-%{version} CFLAGS="$RPM_OPT_FLAGS" \ CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix= --bindir=%_bindir --sbindir=%_sbindir \ --sysconfdir=/etc/%new_name/ --sysvdir=%_initrddir \ --logdir=/var/log/%new_name/ --piddir=/var/run/ \ --runas_usr=squid --runas_grp=squid \ --mandir=%_mandir --cgidir=/var/www-naat/squidGuard #make OPTIMISE="$RPM_OPT_FLAGS" make %install #cd %{name}-%{version} rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_sbindir} mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name} mkdir -p $RPM_BUILD_ROOT/var/log/dansguardian mkdir -p $RPM_BUILD_ROOT/%{_initrddir} mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin install dansguardian $RPM_BUILD_ROOT/%{_sbindir}/dansguardian install dansguardian.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/dansguardian.conf install bannedphraselist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedphraselist install bannedextensionlist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedextensionlist install bannedmimetypelist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedmimetypelist install bannedsitelist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedsitelist install bannedurllist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedurllist install bannedregexpurllist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/bannedregexpurllist install exceptionsitelist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/exceptionsitelist install exceptionuserlist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/exceptionuserlist install exceptioniplist $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/exceptioniplist install pics $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/pics install logrotation $RPM_BUILD_ROOT/%{_sysconfdir}/%{new_name}/logrotation install %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/dansguardian install dansguardian.pl $RPM_BUILD_ROOT/var/www/cgi-bin/dansguardian.pl install -m 644 dansguardian.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/dansguardian.8.gz %preun %{_preun_service dansguardian} if [ $1 = 0 ] ; then rm -f /var/log/dansguardian/* fi %post %{_post_service dansguardian} touch /var/log/dansguardian/access.log chown -R squid.squid /var/log/dansguardian chmod -R u+rw /var/log/dansguardian chmod u+rwx /var/log/dansguardian echo -e " Be sure to change your /etc/dansguardian/dansguardian.conf to reflect your own settings. Special attention must be given to the port that squid listens on, the port that dansguardian will listen to and to the web url to the dansguardian.pl cgi-script. Author: Daniel Barron daniel@jadeb.com " %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README INSTALL LICENSE %defattr(0600,root,root) %config(noreplace) %{_sysconfdir}/%{new_name}/* %defattr(755,root,root) %{_sbindir}/%{new_name} %config(noreplace) %{_initrddir}/dansguardian %defattr(0755,apache,apache) /var/www/cgi-bin/dansguardian.pl %defattr(-,squid,squid) /var/log/dansguardian/ %changelog * Thu Mar 14 2002 Florin <florin@mandrakesoft.com> 2.2.7-1mdk - 2.2.7 * Wed Feb 27 2002 Florin <florin@mandrakesoft.com> 2.2.6-1mdk - 2.2.6 * Tue Feb 26 2002 Florin <florin@mandrakesoft.com> 2.2.5-2mdk - add the running patch * Wed Feb 13 2002 Florin <florin@mandrakesoft.com> 2.2.5-1mdk - 2.2.5 - squid.squid instead of nobody.nobody * Thu Jan 31 2002 Florin <florin@mandrakesoft.com> 2.2.3-3mdk - use the right arguments in configure (it works again now) * Sat Jan 26 2002 Jeff Garzik <jgarzik@mandrakesoft.com> 2.2.3-2mdk - Fix build on 64-bit hosts - Build with MDK cflags - Pass additional arguments to ./configure (copied from %%configure) * Mon Jan 14 2002 Florin <florin@mandrakesoft.com> 2.2.3-1mdk - 2.2.3 * Mon Jan 7 2002 Stefan van der Eijk <stefan@eijk.nu> 2.2.2-1mdk - 2.2.2 - Add BuildRequires * Fri Nov 30 2001 Florin <florin@mandrakesoft.com> 2.2.1-1mdk - use macros, variables - fix the description - fix the doc section - remove useless "cd"s - add Url tag - bzip2 sources - use configure - use /war/www/cgi-bin for cgi-dir in configure - the cgi script is now own by apache.apache - add requires on apache-common - fix the package Group - fiw some permissions - remove the RPM_BUILD_ROOT from post - add preun section - add the _preun_service and _postun_service variables - use _mandir for the man dir - modify the initscript (add it as SOURCE1} * Sun Nov 18 2001 Glen Stewart <glen_stewart@associate.com> New 2.2.0 release.