[57924] trunk/dports/net

rmsfisher at macports.org rmsfisher at macports.org
Fri Sep 18 15:12:23 PDT 2009


Revision: 57924
          http://trac.macports.org/changeset/57924
Author:   rmsfisher at macports.org
Date:     2009-09-18 15:12:22 -0700 (Fri, 18 Sep 2009)
Log Message:
-----------
net/dansguardian new port

Added Paths:
-----------
    trunk/dports/net/dansguardian/
    trunk/dports/net/dansguardian/Portfile

Added: trunk/dports/net/dansguardian/Portfile
===================================================================
--- trunk/dports/net/dansguardian/Portfile	                        (rev 0)
+++ trunk/dports/net/dansguardian/Portfile	2009-09-18 22:12:22 UTC (rev 57924)
@@ -0,0 +1,82 @@
+# -*- 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     openmaintainer
+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/
+
+distname        ${name}-${version}
+checksums       md5     0987a1c9bfbdf398118386f10279611a \
+                sha1    ff3012e01130b2269582c21c3eeb4ea013dc9679 \
+                rmd160  dc15ca9779a5084c5e4248545c730f25fff241a3
+
+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!"
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090918/bbcfe7b1/attachment.html>


More information about the macports-changes mailing list