]>
Commit | Line | Data |
---|---|---|
31cc422a | 1 | # TODO: |
ad5d1433 | 2 | Summary: Content filtering web proxy |
d2e032aa | 3 | Summary(pl.UTF-8): Proxy WWW filtrujące treść |
ad5d1433 | 4 | Name: dansguardian |
31cc422a | 5 | Version: 2.10.0.2 |
49be85bd | 6 | Release: 0.1 |
ad5d1433 | 7 | License: GPL |
8 | Group: Networking/Daemons | |
31cc422a | 9 | Source0: http://dansguardian.org/downloads/2/Stable/%{name}-%{version}.tar.gz |
10 | # Source0-md5: 0a6c6d35c9e0c82fbc4a2150e8ffe977 | |
ad5d1433 | 11 | Source1: %{name}.init |
12 | Source2: %{name}.httpd | |
31cc422a | 13 | Source3: %{name}.lighttpd |
14 | Source4: %{name}.logrotate | |
6d107456 | 15 | URL: http://www.dansguardian.org/ |
31cc422a | 16 | BuildRequires: autoconf |
17 | BuildRequires: automake | |
18 | BuildRequires: clamav-devel | |
6d107456 | 19 | BuildRequires: libstdc++-devel |
31cc422a | 20 | BuildRequires: rpmbuild(macros) >= 1.304 |
6d107456 | 21 | BuildRequires: zlib-devel |
31cc422a | 22 | Requires: webapps |
9a758eb8 | 23 | Requires: rc-scripts |
6d107456 | 24 | Requires(post,preun): /sbin/chkconfig |
ad5d1433 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
31cc422a | 27 | %define _webapp %{name} |
28 | %define _webapps /etc/webapps | |
29 | %define _webappdir %{_webapps}/%{_webapp} | |
30 | %define _appdir %{_datadir}/%{_webapp} | |
5392dcd0 | 31 | |
ad5d1433 | 32 | %description |
33 | DansGuardian is a web filtering engine that checks the content within | |
34 | the page itself in addition to the more traditional URL filtering. | |
35 | ||
36 | DansGuardian is a content filtering proxy. It filters using multiple | |
37 | methods, including URL and domain filtering, content phrase filtering, | |
38 | PICS filtering, MIME filtering, file extension filtering, POST | |
39 | filtering. | |
40 | ||
c36330e6 JR |
41 | %description -l pl.UTF-8 |
42 | DansGuardian to silnik filtrowania WWW sprawdzający treść na samych | |
43 | stronach oprócz bardziej tradycyjnego filtrowania URL-i. | |
aac466dd | 44 | |
c36330e6 JR |
45 | DansGuardian to proxy filtrujące treść przy użyciu wielu metod, w tym |
46 | filtrowania URL-i i domen, fraz zawartych w treści, filtrowania PICS, | |
47 | filtrowania MIME, filtrowania po rozszerzeniach plików, filtrowania | |
aac466dd JB |
48 | POST. |
49 | ||
ad5d1433 | 50 | %prep |
51 | %setup -q | |
ad5d1433 | 52 | |
53 | %build | |
31cc422a | 54 | %{__aclocal} |
55 | %{__autoconf} | |
56 | %{__autoheader} | |
57 | %{__automake} | |
58 | ||
59 | %configure \ | |
60 | --enable-pcre \ | |
61 | --enable-lfs \ | |
62 | --enable-clamav \ | |
63 | --enable-clamd \ | |
64 | --enable-icap \ | |
65 | --enable-kavd \ | |
66 | --enable-commandline \ | |
67 | --enable-fancydm \ | |
68 | --enable-trickledm \ | |
69 | --enable-ntlm \ | |
70 | --enable-email \ | |
71 | %if %{with debug} | |
72 | --enable-segv-backtrace \ | |
73 | --with-dgdebug \ | |
74 | %endif | |
75 | --with-proxyuser nobody \ | |
76 | --with-proxygroup nobody | |
77 | ||
78 | ||
79 | %{__make} | |
ad5d1433 | 80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
31cc422a | 83 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d} \ |
84 | $RPM_BUILD_ROOT/var/log/dansguardian \ | |
85 | $RPM_BUILD_ROOT%{_webappdir} | |
86 | ||
87 | %{__make} install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT | |
aac466dd | 89 | |
a5ea2140 | 90 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dansguardian |
31cc422a | 91 | install %{SOURCE2} $RPM_BUILD_ROOT%{_webappdir}/apache.conf |
92 | install %{SOURCE2} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf | |
93 | install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf | |
94 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
95 | ||
96 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
97 | %webapp_register apache %{_webapp} | |
98 | ||
99 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
100 | %webapp_unregister apache %{_webapp} | |
101 | ||
102 | %triggerin -- apache < 2.2.0, apache-base | |
103 | %webapp_register httpd %{_webapp} | |
104 | ||
105 | %triggerun -- apache < 2.2.0, apache-base | |
106 | %webapp_unregister httpd %{_webapp} | |
107 | ||
108 | %%triggerin -- lighttpd | |
109 | %%webapp_register lighttpd %{_webapp} | |
110 | ||
111 | %%triggerun -- lighttpd | |
112 | %%webapp_unregister lighttpd %{_webapp} | |
aac466dd JB |
113 | |
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
ad5d1433 | 116 | |
117 | %post | |
118 | /sbin/chkconfig --add dansguardian | |
c5820ae0 | 119 | %service dansguardian restart "DansGuardian daemon" |
ad5d1433 | 120 | |
121 | %preun | |
122 | if [ "$1" = "0" ]; then | |
31cc422a | 123 | %service dansguardian stop |
aac466dd | 124 | /sbin/chkconfig --del dansguardian |
ad5d1433 | 125 | fi |
126 | ||
ad5d1433 | 127 | %files |
128 | %defattr(644,root,root,755) | |
31cc422a | 129 | %doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ doc/FAQ.html doc/Plugins |
ad5d1433 | 130 | %{_mandir}/man8/dansguardian.8* |
131 | %attr(754,root,root) /etc/rc.d/init.d/dansguardian | |
31cc422a | 132 | %attr(755,root,root) %{_sbindir}/dansguardian |
133 | %dir %{_datadir}/dansguardian | |
134 | %{_datadir}/dansguardian/languages | |
135 | %{_datadir}/dansguardian/scripts | |
136 | %{_datadir}/dansguardian/transparent1x1.gif | |
137 | %attr(755,root,root) %{_datadir}/dansguardian/dansguardian.pl | |
138 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
aac466dd | 139 | %dir %{_sysconfdir}/dansguardian |
31cc422a | 140 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dansguardian/*.conf |
141 | %dir %{_sysconfdir}/dansguardian/authplugins | |
142 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dansguardian/authplugins/*.conf | |
143 | %dir %{_sysconfdir}/dansguardian/contentscanners/ | |
144 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dansguardian/contentscanners/*.conf | |
145 | %dir %{_sysconfdir}/dansguardian/downloadmanagers | |
146 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dansguardian/downloadmanagers/*.conf | |
147 | %{_sysconfdir}/dansguardian/lists | |
148 | %dir %{_webappdir} | |
149 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf | |
150 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf | |
151 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf | |
152 | %attr(750,root,root) %dir /var/log/dansguardian |