Summary: Set up dansguardian to filter www content. %define name smeserver-dansguardian Name: %{name} %define version 2.9 %define release 2 Version: %{version} Release: %{release}%{?dist} Vendor: dungog.net License: GPL URL: http://www.dungog.net/sme Group: Mitel/addon Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-%{version} BuildArchitectures: noarch Requires: e-smith-release >= 7.0 Requires: dansguardian >= 2.9 BuildRequires: e-smith-devtools AutoReqProv: no %description rpm to setup dansguardian.org web content filter %changelog * Wed Sep 27 2006 Stephen Noble - lograte gzip's files - uses initialize-default-databases - [2.9-2] * Wed Sep 27 2006 Stephen Noble - update for 2.9 - no longer runs under daemontools - [2.9-1] * Sun Mar 12 2006 Stephen Noble - 15AuthProgramPamAuth, spaces removed from realm - [1.2-4] * Thu Mar 9 2006 Stephen Noble - 15AuthProgramPamAuth, realm put inside quotes - ident added, but it's broken - [1.2-3] * Sun Nov 6 2005 Stephen Noble - db value to block ports changed - ncsa_auth password file changed - [1.2-2] * Fri Sep 16 2005 Stephen Noble - SME7 initial version - runs under daemontools - for DG 2.8.0.6-el4 no patches - [1.2-1] * Tue Nov 6 2001 Stephen Noble 0.1-1 - initial release %prep %setup %build perl createlinks mkdir -p root/etc/e-smith/db/configuration/defaults/dansguardian echo "service" > root/etc/e-smith/db/configuration/defaults/dansguardian/type echo "enabled" > root/etc/e-smith/db/configuration/defaults/dansguardian/status %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --file '/etc/cron.weekly/dansguardian-logrotate' 'attr(0755,root,root)' \ > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post #new installs #if [ $1 = 1 ] ; then #fi /etc/e-smith/events/actions/initialize-default-databases #gzip old log files if [ -z /var/log/dansguardian/access.log.1 ] ; then gzip -f /var/log/dansguardian/access.log.1 fi if [ -z /var/log/dansguardian/access.log.2 ] ; then gzip -f /var/log/dansguardian/access.log.2 fi if [ -z /var/log/dansguardian/access.log.3 ] ; then gzip -f /var/log/dansguardian/access.log.3 fi if [ -z /var/log/dansguardian/access.log.4 ] ; then gzip -f /var/log/dansguardian/access.log.4 fi %postun #uninstalls if [ $1 = 0 ] ; then /sbin/e-smith/db configuration setprop squid TransparentPort 3128 /sbin/e-smith/expand-template /etc/httpd/conf/proxy/proxy.pac /sbin/e-smith/expand-template /etc/squid/squid.conf echo 'optionally run signal-event network-create to complete uninstall' fi #&upgrades %files -f %{name}-%{version}-filelist %defattr(-,root,root)