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