# -*- 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 # $Id$ PortSystem 1.0 name dansguardian version 2.10.1.1 categories net platforms darwin maintainers nomaintainer description web content filter long_description DansGuardian is content-control software: software \ designed to control which websites users can access.\ It also includes virus filtering and usage monitoring features. homepage http://dansguardian.org/ master_sites http://dansguardian.org/downloads/2/Stable/ \ http://usmirror.dansguardian.org/downloads/2/Stable/ \ http://mirrors.evis.net.ph/dansguardian/downloads/2/Stable/ checksums md5 0987a1c9bfbdf398118386f10279611a \ sha1 ff3012e01130b2269582c21c3eeb4ea013dc9679 \ rmd160 dc15ca9779a5084c5e4248545c730f25fff241a3 depends_build port:pkgconfig depends_lib port:zlib \ port:pcre configure.args --enable-pcre \ --disable-ntlm \ --disable-clamav use_parallel_build yes startupitem.create yes startupitem.name dansguardian startupitem.executable ${prefix}/sbin/dansguardian -N variant clamav description {Enable support for libclamav av scanner} { depends_lib-append port:clamav # enable --enable-clamav in the next version if it works with >=clamav-0.95 #configure.args-delete --disable-clamav #configure.args-append --enable-clamav configure.args-append --enable-clamd \ --with-proxyuser=clamav \ --with-proxygroup=clamav } variant ntlm description {Enable support for the NTLM auth plugin} { depends_lib-append port:libntlm \ port:libiconv configure.args-delete --disable-ntlm configure.args-append --enable-ntlm } post-destroot { set runas_user nobody set runas_group nobody if { [variant_isset clamav]} { if { [existsuser clamav] && [existsgroup clamav] } { set runas_user clamav set runas_group clamav } ui_msg "\n DansGuardian and clamd must run with either the same group or user ID. \n\ Don't forget to set clamd socket in etc/dansguardian/contentscanners/clamdscan.conf.\n" } # by default dansguardian runs as nobody and writes log to /var/log/dansguardian/access.log # !!! when user rebuilds dansguardian with clamav variant var/log/dansguardian/access.log has old owner and access is denied # the solution is to rm -rf ${prefix}/var/log/dansguardian and port activate dansguardian xinstall -d -o ${runas_user} -g ${runas_group} -m 755 ${destroot}${prefix}/var/log/dansguardian destroot.keepdirs-append ${destroot}${prefix}/var/log/dansguardian } livecheck.type regex livecheck.url "http://dansguardian.org/?page=news" livecheck.regex "DansGuardian (.*) is.*released!"