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