1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name dansguardian |
---|
7 | version 2.10.1.1 |
---|
8 | categories net |
---|
9 | platforms darwin |
---|
10 | maintainers nomaintainer |
---|
11 | description web content filter |
---|
12 | long_description DansGuardian is content-control software: software \ |
---|
13 | designed to control which websites users can access.\ |
---|
14 | It also includes virus filtering and usage monitoring features. |
---|
15 | |
---|
16 | homepage http://dansguardian.org/ |
---|
17 | master_sites http://dansguardian.org/downloads/2/Stable/ \ |
---|
18 | http://usmirror.dansguardian.org/downloads/2/Stable/ \ |
---|
19 | http://mirrors.evis.net.ph/dansguardian/downloads/2/Stable/ |
---|
20 | |
---|
21 | distname ${name}-${version} |
---|
22 | checksums md5 0987a1c9bfbdf398118386f10279611a \ |
---|
23 | sha1 ff3012e01130b2269582c21c3eeb4ea013dc9679 \ |
---|
24 | rmd160 dc15ca9779a5084c5e4248545c730f25fff241a3 |
---|
25 | |
---|
26 | depends_lib port:zlib \ |
---|
27 | port:pcre |
---|
28 | |
---|
29 | configure.args --enable-pcre \ |
---|
30 | --disable-ntlm \ |
---|
31 | --disable-clamav |
---|
32 | |
---|
33 | use_parallel_build yes |
---|
34 | |
---|
35 | startupitem.create yes |
---|
36 | startupitem.name dansguardian |
---|
37 | startupitem.executable ${prefix}/sbin/dansguardian -N |
---|
38 | |
---|
39 | variant clamav description {Enable support for libclamav av scanner} { |
---|
40 | depends_lib-append port:clamav |
---|
41 | |
---|
42 | # enable --enable-clamav in the next version if it works with >=clamav-0.95 |
---|
43 | #configure.args-delete --disable-clamav |
---|
44 | #configure.args-append --enable-clamav |
---|
45 | |
---|
46 | configure.args-append --enable-clamd \ |
---|
47 | --with-proxyuser=clamav \ |
---|
48 | --with-proxygroup=clamav |
---|
49 | } |
---|
50 | |
---|
51 | variant ntlm description {Enable support for the NTLM auth plugin} { |
---|
52 | depends_lib-append port:libntlm \ |
---|
53 | port:libiconv |
---|
54 | configure.args-delete --disable-ntlm |
---|
55 | configure.args-append --enable-ntlm |
---|
56 | } |
---|
57 | |
---|
58 | post-destroot { |
---|
59 | set runas_user nobody |
---|
60 | set runas_group nobody |
---|
61 | |
---|
62 | if { [variant_isset clamav]} { |
---|
63 | if { [existsuser clamav] && [existsgroup clamav] } { |
---|
64 | set runas_user clamav |
---|
65 | set runas_group clamav |
---|
66 | } |
---|
67 | |
---|
68 | ui_msg "\n DansGuardian and clamd must run with either the same group or user ID. \n\ |
---|
69 | Don't forget to set clamd socket in etc/dansguardian/contentscanners/clamdscan.conf.\n" |
---|
70 | } |
---|
71 | |
---|
72 | # by default dansguardian runs as nobody and writes log to /var/log/dansguardian/access.log |
---|
73 | # !!! when user rebuilds dansguardian with clamav variant var/log/dansguardian/access.log has old owner and access is denied |
---|
74 | # the solution is to rm -rf ${prefix}/var/log/dansguardian and port activate dansguardian |
---|
75 | xinstall -d -o ${runas_user} -g ${runas_group} -m 755 ${destroot}${prefix}/var/log/dansguardian |
---|
76 | destroot.keepdirs-append ${destroot}${prefix}/var/log/dansguardian |
---|
77 | } |
---|
78 | |
---|
79 | livecheck.type regex |
---|
80 | livecheck.url "http://dansguardian.org/?page=news" |
---|
81 | livecheck.regex "DansGuardian (.*) is.*released!" |
---|
82 | |
---|