1 |
Name: dansguardian |
2 |
Version: 2.9.9.1 |
3 |
Release: 1%{?dist} |
4 |
Summary: Content filter |
5 |
License: GNU GPL version 2 |
6 |
Url: http://www.dansguardian.org |
7 |
Group: System/Servers |
8 |
Source0: %name-%version.tar.gz |
9 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
10 |
BuildRequires: gcc-c++ pcre-devel zlib-devel clamav-devel |
11 |
Requires: squid clamav |
12 |
#clamav-lib |
13 |
|
14 |
%description |
15 |
DansGuardian is a web content filtering proxy that uses Squid to do all |
16 |
the fetching. It filters using multiple methods. These methods include |
17 |
URL and domain filtering, content phrase filtering, PICS filtering, |
18 |
MIME filtering, file extension filtering, POST limiting. |
19 |
|
20 |
%prep |
21 |
%setup -q |
22 |
%build |
23 |
%configure --datadir=/etc \ |
24 |
--enable-clamd \ |
25 |
--enable-clamav \ |
26 |
--enable-icap \ |
27 |
--enable-ntlm \ |
28 |
--enable-pcre \ |
29 |
--enable-trickledm \ |
30 |
--enable-fancydm \ |
31 |
--enable-email \ |
32 |
--with-logdir=/var/log/dansguardian \ |
33 |
--with-proxyuser=clamav \ |
34 |
--with-proxygroup=clamav \ |
35 |
--with-piddir=/var/run |
36 |
make |
37 |
|
38 |
%install |
39 |
rm -rf $RPM_BUILD_ROOT |
40 |
|
41 |
make DESTDIR=$RPM_BUILD_ROOT install |
42 |
mkdir -p $RPM_BUILD_ROOT/etc/init.d/ |
43 |
mkdir -p $RPM_BUILD_ROOT/usr/share/dansguardian |
44 |
touch $RPM_BUILD_ROOT/etc/dansguardian/lists/exceptionfileurllist |
45 |
cp $RPM_BUILD_ROOT/etc/dansguardian/scripts/systemv-init $RPM_BUILD_ROOT/etc/init.d/dansguardian |
46 |
|
47 |
%clean |
48 |
rm -rf $RPM_BUILD_ROOT |
49 |
|
50 |
%pre |
51 |
#shouldn't be needed now dans2.8 has all been upgraded |
52 |
# upgrade won't chmod to clamav, so lets do it here |
53 |
#if [ -d /var/log/dansguardian ] ; then |
54 |
# chown -R clamav /var/log/dansguardian |
55 |
#fi |
56 |
# may be better to just shut dans down during upgrade ? |
57 |
#if [ -e /tmp/.dguardianipc ] ; then |
58 |
# chown clamav /tmp/.dguardianipc |
59 |
# chown clamav /tmp/.dguardianurlipc |
60 |
#fi |
61 |
|
62 |
%post |
63 |
%preun |
64 |
if [ $1 = 0 ]; then |
65 |
/sbin/service %{name} stop 2>/dev/null 1>/dev/null |
66 |
fi |
67 |
|
68 |
%files |
69 |
%defattr(-,root,root) |
70 |
%doc README NEWS ChangeLog AUTHORS COPYING |
71 |
%doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ doc/FAQ.html doc/Plugins |
72 |
%attr(0755,root,root) %dir /etc/dansguardian |
73 |
%attr(0644,root,root) %config(noreplace) /etc/dansguardian/* |
74 |
%attr(0755,root,root) /etc/init.d/dansguardian |
75 |
%attr(0755,clamav,nobody) %dir /var/log/dansguardian |
76 |
%attr(0755,root,root) %{_sbindir}/* |
77 |
%attr(0644,root,root) %{_mandir}/*/* |
78 |
%{_datadir}/%{name}/ |
79 |
|
80 |
%changelog |
81 |
* Sun Oct 28 2007 Stephen Noble dungog.net |
82 |
- rebuild for SME Server 2.9.9.1 |
83 |
|
84 |
* Tue Jun 19 2007 Daniel Bartz |
85 |
- rebuild for the centos repo |