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