1 |
# $Id$ |
2 |
# Authority: dag |
3 |
# Upstream: Daniel Barron <author$dansguardian,org> |
4 |
|
5 |
%define real_name DansGuardian |
6 |
|
7 |
Summary: Content filtering web proxy |
8 |
Name: dansguardian |
9 |
Version: 2.10.1.1 |
10 |
Release: 1%{?dist} |
11 |
License: GPLv2+ |
12 |
Group: System Environment/Daemons |
13 |
URL: http://www.dansguardian.org/ |
14 |
|
15 |
Packager: Dag Wieers <dag@wieers.com> |
16 |
Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ |
17 |
|
18 |
Source0: http://dansguardian.org/downloads/2/Stable/%{name}-%{version}.tar.gz |
19 |
Source1: dansguardian.init |
20 |
Source2: dansguardian.httpd |
21 |
Source3: dansguardian.logrotate |
22 |
|
23 |
# Fixes some compilation errors with gcc 4.4 |
24 |
Patch1: dansguardian-gcc44.patch |
25 |
|
26 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
27 |
|
28 |
BuildRequires: gcc-c++ |
29 |
BuildRequires: pcre-devel |
30 |
BuildRequires: zlib-devel |
31 |
BuildRequires: pkgconfig |
32 |
BuildRequires: which |
33 |
|
34 |
Requires(pre): shadow-utils |
35 |
Requires(post): chkconfig |
36 |
Requires(preun): chkconfig |
37 |
Requires(preun): initscripts |
38 |
|
39 |
%description |
40 |
DansGuardian is a web filtering engine that checks the content within |
41 |
the page itself in addition to the more traditional URL filtering. |
42 |
|
43 |
DansGuardian is a content filtering proxy. It filters using multiple methods, |
44 |
including URL and domain filtering, content phrase filtering, PICS filtering, |
45 |
MIME filtering, file extension filtering, POST filtering. |
46 |
|
47 |
%prep |
48 |
%setup |
49 |
%patch1 -p1 |
50 |
|
51 |
%build |
52 |
|
53 |
%configure \ |
54 |
--disable-clamav \ |
55 |
--disable-clamd \ |
56 |
--enable-icap \ |
57 |
--enable-kavd \ |
58 |
--enable-commandline \ |
59 |
--enable-trickledm \ |
60 |
--enable-ntlm \ |
61 |
--enable-email \ |
62 |
--with-proxyuser=dansguardian \ |
63 |
--with-proxygroup=dansguardian |
64 |
|
65 |
%{__make} %{?_smp_mflags} |
66 |
|
67 |
%install |
68 |
%{__rm} -rf %{buildroot} |
69 |
|
70 |
%{__make} install DESTDIR=%{buildroot} |
71 |
|
72 |
install -Dpm 644 %{SOURCE3} \ |
73 |
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} |
74 |
|
75 |
# delete the other scripts since they are of no use for Fedora users |
76 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts |
77 |
chmod 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.pl |
78 |
|
79 |
# install init script and httpd config |
80 |
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} |
81 |
install -Dp -m0644 %{SOURCE2} \ |
82 |
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf |
83 |
|
84 |
# we'll install this later within %doc |
85 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
86 |
|
87 |
# create the log dir |
88 |
install -dm 755 $RPM_BUILD_ROOT%{_localstatedir}/log/%{name} |
89 |
|
90 |
%clean |
91 |
%{__rm} -rf %{buildroot} |
92 |
|
93 |
%pre |
94 |
getent group %{name} >/dev/null || groupadd -r %{name} |
95 |
getent passwd %{name} >/dev/null || \ |
96 |
useradd -r -g %{name} -d %{_datadir}/%{name} -s /sbin/nologin \ |
97 |
-c "DansGuardian web content filter" %{name} |
98 |
exit 0 |
99 |
|
100 |
%post |
101 |
if [ $1 -eq 1 ]; then |
102 |
/sbin/chkconfig --add %{name} |
103 |
fi |
104 |
|
105 |
%preun |
106 |
if [ $1 -eq 0 ]; then |
107 |
/sbin/service %{name} stop >/dev/null 2>&1 |
108 |
/sbin/chkconfig --del %{name} |
109 |
fi |
110 |
|
111 |
%postun |
112 |
if [ $1 -ge 1 ] ; then |
113 |
/sbin/service %{name} condrestart >/dev/null 2>&1 || : |
114 |
fi |
115 |
|
116 |
%files |
117 |
%defattr(-, root, root, 0755) |
118 |
%doc COPYING INSTALL README UPGRADING |
119 |
%doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ |
120 |
%doc doc/FAQ.html doc/Plugins |
121 |
%doc %{_mandir}/man8/%{name}.8.gz |
122 |
%{_sbindir}/%{name} |
123 |
%attr(-,%{name},%{name}) %{_datadir}/%{name} |
124 |
%{_initrddir}/%{name} |
125 |
%dir %{_sysconfdir}/%{name} |
126 |
%config(noreplace) %{_sysconfdir}/%{name}/%{name}*.conf |
127 |
%dir %{_sysconfdir}/%{name}/authplugins |
128 |
%config(noreplace) %{_sysconfdir}/%{name}/authplugins/* |
129 |
%dir %{_sysconfdir}/%{name}/contentscanners |
130 |
%config(noreplace) %{_sysconfdir}/%{name}/contentscanners/* |
131 |
%dir %{_sysconfdir}/%{name}/downloadmanagers |
132 |
%config(noreplace) %{_sysconfdir}/%{name}/downloadmanagers/* |
133 |
%dir %{_sysconfdir}/%{name}/lists |
134 |
%config(noreplace) %{_sysconfdir}/%{name}/lists/* |
135 |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
136 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
137 |
|
138 |
%defattr(644, %{name}, %{name}, 755) |
139 |
%dir %{_localstatedir}/log/%{name} |
140 |
|
141 |
%changelog |
142 |
* Thu Jul 14 2011 Yury V. Zaytsev <yury@shurup.com> - 2.10.1.1-1 |
143 |
- Synced the SPEC with Fedora Rawhide where appropriate. |
144 |
- Updated to release 2.10.1.1. |
145 |
|
146 |
* Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 2.8.0.6-1.2 |
147 |
- Rebuild for Fedora Core 5. |
148 |
|
149 |
* Mon Aug 15 2005 Dries Verachtert <dries@ulyssis.org> - 2.8.0.6-1 |
150 |
- Updated to release 2.8.0.6. |
151 |
|
152 |
* Thu Mar 31 2005 Dag Wieers <dag@wieers.com> - 2.8.0.4-1 |
153 |
- Updated to release 2.8.0.4. |
154 |
|
155 |
* Fri Jul 30 2004 Dag Wieers <dag@wieers.com> - 2.8.0.2-1 |
156 |
- Updated to release 2.8.0.2. |
157 |
|
158 |
* Wed Jul 21 2004 Dag Wieers <dag@wieers.com> - 2.8.0-1 |
159 |
- Updated to release 2.8.0-0. |
160 |
|
161 |
* Thu Apr 15 2004 Dag Wieers <dag@wieers.com> - 2.6.1.13-1 |
162 |
- Updated to release 2.6.1-13. |
163 |
|
164 |
* Fri Mar 26 2004 Dag Wieers <dag@wieers.com> - 2.6.1.12-1 |
165 |
- Initial package. (using DAR) |