# -*- 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
description The All Seeing System and Network Monitoring Software
long_description ${description}
homepage http://argus.tcp4me.com/
master_sites http://www.tcp4me.com/code/argus-archive/
distfiles argus-${version}.tgz
checksums rmd160 f8f9eeb6ca5451475594262efcdd571bda931f32 \
sha256 796f2e0783d535556f457635561bee17cb82e3805c2f99d024068187f4b6f563 \
worksrcdir argus-${version}
depends_lib port:perl${perl5.major} \
path:lib/libssl.dylib:openssl \
port:p${perl5.major}-dbi \
port:p${perl5.major}-berkeleydb \
port:p${perl5.major}-socket6 \
port:p${perl5.major}-gd \
port:p${perl5.major}-time-hires \
port:p${perl5.major}-net-ssleay \
port:p${perl5.major}-digest-hmac \
port:p${perl5.major}-digest-md5 \
port:p${perl5.major}-digest-sha1 \
port:p${perl5.major}-crypt-des
patchfiles patch-Makefile.tplt.diff
variant apple_postfix description {Use installed Apple postfix instead of MacPorts version} {
depends_lib-delete port:postfix
# Set the --data_dir configure argument and give me a pointer to it for later reference.
set argus_data_dir ${prefix}/var/argus-monitor
# Set the Argus htdocs directory.
set argus_htdocs ${prefix}/share/${name}/htdocs
PERLNAME=perl${perl5.major}
configure.cmd ./Configure
configure.args --bin_dir=${prefix}/bin \
--sbin_dir=${prefix}/sbin \
--lib_dir=${prefix}/lib/argus-monitor \
--data_dir=${argus_data_dir} \
--www_dir=${argus_htdocs}/ \
--cgi_dir=${argus_htdocs}/cgi-bin
if { [variant_isset apple_postfix] } {
reinplace "s|/lib/sendmail|/usr/sbin/sendmail|g" \
${worksrcpath}/examples/config
reinplace "s|/lib/sendmail|${prefix}/sbin/sendmail|g" \
${worksrcpath}/examples/config
xinstall -m 755 -d ${destroot}${argus_htdocs}/sound
xinstall -m 755 -d ${destroot}${argus_htdocs}/img
xinstall -m 755 ${worksrcpath}/misc/whoopwhoop.wav ${destroot}${argus_htdocs}/sound
xinstall -m 640 {*}[glob ${worksrcpath}/misc/*.gif] ${destroot}${argus_htdocs}/img
xinstall -m 644 -W ${worksrcpath}/misc argus.css argus.js \
${destroot}${argus_htdocs}
file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}