1 |
Summary: Set up dansguardian to filter www content. |
2 |
%define name smeserver-dansguardian |
3 |
Name: %{name} |
4 |
%define version 2.9 |
5 |
%define release 2 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
Vendor: dungog.net |
9 |
License: GPL |
10 |
URL: http://www.dungog.net/sme |
11 |
Group: Mitel/addon |
12 |
Source: %{name}-%{version}.tar.gz |
13 |
BuildRoot: /var/tmp/%{name}-%{version} |
14 |
BuildArchitectures: noarch |
15 |
Requires: e-smith-release >= 7.0 |
16 |
Requires: dansguardian >= 2.9 |
17 |
BuildRequires: e-smith-devtools |
18 |
AutoReqProv: no |
19 |
|
20 |
%description |
21 |
rpm to setup dansguardian.org web content filter |
22 |
|
23 |
%changelog |
24 |
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
25 |
- lograte gzip's files |
26 |
- uses initialize-default-databases |
27 |
- [2.9-2] |
28 |
|
29 |
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
30 |
- update for 2.9 |
31 |
- no longer runs under daemontools |
32 |
- [2.9-1] |
33 |
|
34 |
* Sun Mar 12 2006 Stephen Noble <support@dungog.net> |
35 |
- 15AuthProgramPamAuth, spaces removed from realm |
36 |
- [1.2-4] |
37 |
|
38 |
* Thu Mar 9 2006 Stephen Noble <support@dungog.net> |
39 |
- 15AuthProgramPamAuth, realm put inside quotes |
40 |
- ident added, but it's broken |
41 |
- [1.2-3] |
42 |
|
43 |
* Sun Nov 6 2005 Stephen Noble <support@dungog.net> |
44 |
- db value to block ports changed |
45 |
- ncsa_auth password file changed |
46 |
- [1.2-2] |
47 |
|
48 |
* Fri Sep 16 2005 Stephen Noble <support@dungog.net> |
49 |
- SME7 initial version |
50 |
- runs under daemontools |
51 |
- for DG 2.8.0.6-el4 no patches |
52 |
- [1.2-1] |
53 |
|
54 |
<snip> |
55 |
* Tue Nov 6 2001 Stephen Noble <stephen@dungog.net> 0.1-1 |
56 |
- initial release |
57 |
|
58 |
%prep |
59 |
%setup |
60 |
|
61 |
%build |
62 |
perl createlinks |
63 |
|
64 |
mkdir -p root/etc/e-smith/db/configuration/defaults/dansguardian |
65 |
echo "service" > root/etc/e-smith/db/configuration/defaults/dansguardian/type |
66 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/dansguardian/status |
67 |
|
68 |
%install |
69 |
rm -rf $RPM_BUILD_ROOT |
70 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
71 |
rm -f %{name}-%{version}-filelist |
72 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
73 |
--file '/etc/cron.weekly/dansguardian-logrotate' 'attr(0755,root,root)' \ |
74 |
> %{name}-%{version}-filelist |
75 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
76 |
|
77 |
%clean |
78 |
cd .. |
79 |
rm -rf %{name}-%{version} |
80 |
|
81 |
%pre |
82 |
|
83 |
%preun |
84 |
%post |
85 |
#new installs |
86 |
#if [ $1 = 1 ] ; then |
87 |
#fi |
88 |
|
89 |
/etc/e-smith/events/actions/initialize-default-databases |
90 |
|
91 |
#gzip old log files |
92 |
if [ -z /var/log/dansguardian/access.log.1 ] ; then |
93 |
gzip -f /var/log/dansguardian/access.log.1 |
94 |
fi |
95 |
if [ -z /var/log/dansguardian/access.log.2 ] ; then |
96 |
gzip -f /var/log/dansguardian/access.log.2 |
97 |
fi |
98 |
if [ -z /var/log/dansguardian/access.log.3 ] ; then |
99 |
gzip -f /var/log/dansguardian/access.log.3 |
100 |
fi |
101 |
if [ -z /var/log/dansguardian/access.log.4 ] ; then |
102 |
gzip -f /var/log/dansguardian/access.log.4 |
103 |
fi |
104 |
|
105 |
%postun |
106 |
|
107 |
#uninstalls |
108 |
if [ $1 = 0 ] ; then |
109 |
/sbin/e-smith/db configuration setprop squid TransparentPort 3128 |
110 |
/sbin/e-smith/expand-template /etc/httpd/conf/proxy/proxy.pac |
111 |
/sbin/e-smith/expand-template /etc/squid/squid.conf |
112 |
echo 'optionally run signal-event network-create to complete uninstall' |
113 |
fi |
114 |
|
115 |
#&upgrades |
116 |
|
117 |
%files -f %{name}-%{version}-filelist |
118 |
%defattr(-,root,root) |