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