# $Id$ PortSystem 1.0 name clamav-server version 0.95.3 homepage http://www.clamav.net/ categories sysutils platforms darwin maintainers brad@pixilla license GPL distfiles description \ clamav antivirus software long_description \ Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The \ main purpose of this software is the integration with mail \ servers (attachment scanning). depends_run \ port:clamav if {"darwin" == ${os.platform} && ${os.major} > 8} { set clamavuser _clamav } else { set clamavuser clamav } use_configure no build {} destroot { addgroup ${clamavuser} set gid [existsgroup ${clamavuser}] adduser ${clamavuser} gid=${gid} realname=clamav set LaunchDaemonsPath ${destroot}/Library/LaunchDaemons xinstall -d ${LaunchDaemonsPath} xinstall -m 0644 -W ${filespath} \ org.macports.clamd.plist \ org.macports.freshclam.plist \ ${LaunchDaemonsPath} set dataPath ${prefix}/var/clamav set logPath ${prefix}/var/log/clamav set runPath ${prefix}/var/run/clamav xinstall -m 0755 -o ${clamavuser} -g ${clamavuser} -d \ ${destroot}${dataPath} \ ${destroot}${logPath} \ ${destroot}${runPath} touch ${destroot}${logPath}/clamav.log destroot.keepdirs \ ${destroot}${dataPath} \ ${destroot}${runPath} ui_msg "******************************************************" ui_msg "* To configure clamd and freshclam look for the following files" ui_msg "* ${prefix}/etc/clamd.conf" ui_msg "* ${prefix}/etc/freshclam.conf" ui_msg "**" ui_msg "* If these files do not exist copy do the following to copy these files into place" ui_msg "cp ${prefix}/etc/example-clamd.conf ${prefix}/etc/clamd.conf" ui_msg "cp ${prefix}/etc/example-freshclam.conf ${prefix}/etc/freshclam.conf" ui_msg "**" ui_msg "* Alter/Add the following lines to your ${prefix}/etc/clamd.conf" ui_msg "* Comment out 'Example' near the top like so '#Example'" ui_msg "* LogFile ${logPath}/clamd.log" ui_msg "* PidFile ${runPath}/clamd.pid" ui_msg "* LocalSocket ${runPath}/clamd.socket" ui_msg "**" ui_msg "* Alter/Add the following lines to your ${prefix}/etc/freshclam.conf" ui_msg "* Comment out 'Example' near the top like so '#Example'" ui_msg "* UpdateLogFile ${logPath}/freshclam.log" ui_msg "* PidFile ${runPath}/freshclam.pid" ui_msg "* NotifyClamd ${prefix}/etc/clamd.conf" ui_msg "**" ui_msg "* Two launchd startup items have been installed" ui_msg "**" ui_msg "* To load clamd and freshclam do the following" ui_msg "launchctl load -w /Library/LaunchDaemons/org.macports.clamd.plist" ui_msg "launchctl load -w /Library/LaunchDaemons/org.macports.freshclam.plist" ui_msg "**" ui_msg "* To unload clamd and freshclam do the following" ui_msg "launchctl unload -w /Library/LaunchDaemons/org.macports.clamd.plist" ui_msg "launchctl unload -w /Library/LaunchDaemons/org.macports.freshclam.plist" ui_msg "**" ui_msg "* To try things out do" ui_msg "freshclam" ui_msg "* If all is well you should see your clamav database being updated" ui_msg "******************************************************" } livecheck.type regex livecheck.url http://sourceforge.net/projects/clamav/files livecheck.regex clamav-(\\d+.\\d+.\\d+)${extract.suffix}