Portfile

# $Id: Portfile 20463 2006-11-03 15:17:21Z blair@macports.org $
PortSystem 1.0
name portsentry
version 1.1
categories security
maintainers julien.touche@touche.fr.st
description port scan detection and active defense
long_description \
PortSentry is part of the Abacus Project suite of \
security tools. \
It is a program designed to detect and respond to port \
scans against \
a target host in real-time. There are other port scan \
detectors that \
perform similar detection of scans, but PortSentry has \
some unique \
features that may make it worth looking into.
homepage http://sourceforge.net/projects/sentrytools
master_sites \
http://www.packetstormsecurity.org/UNIX/IDS/ \
sourceforge:sentrytools
platforms darwin
checksums md5 782839446b7eca554bb1880ef0882670
configure { }
build.target generic

## 1.2 beta from sf.net doesn't compile
## 1.2
#checksums md5 3ebd3618ba9abfea2525e236bd44cebd
#set worksrcdir ${name}_beta

post-patch {
reinplace \
"s|/usr/local/psionic/portsentry/portsentry.conf|${prefix}/etc/${name}/portsentry.conf|"\
${worksrcpath}/portsentry_config.h
reinplace \
"s|/usr/local/psionic/portsentry|${prefix}/etc/${name}|g" \
${worksrcpath}/portsentry.conf
}

destroot {
file mkdir ${destroot}${prefix}/etc/${name}
file mkdir ${destroot}${prefix}/share/doc/${name}
foreach doc_file {
README.install README.methods README.stealth
} { system "install -m 644 ${worksrcpath}/$doc_file ${destroot}${prefix}/share/doc/${name}" }
foreach file {
portsentry.conf portsentry.ignore
} { system "install -m 644 ${worksrcpath}/$file ${destroot}${prefix}/etc/${name}" }
system "install -m 755 ${worksrcpath}/portsentry ${destroot}${prefix}/libexec/"
}