# -*- 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
categories security sysutils
maintainers {snc @nerdling} openmaintainer
description DenyHosts is a utility to help sys admins thwart ssh hackers
long_description DenyHosts is a python program that automatically blocks ssh\
attacks by adding entries to /etc/hosts.deny. DenyHosts\
will also inform Linux administrators about offending\
hosts, attacked users and suspicious logins.
distname DenyHosts-${version}
homepage http://denyhosts.sourceforge.net/
master_sites sourceforge:denyhosts
checksums rmd160 cab4206af992f5405ed1c9b302341c7b5649c71a \
sha256 5190ead13a7238e3ccf328cb3b71b16716e1c73939909a4f3fa6904ba58ddf7d
patchfiles patch-denyhosts.cfg-dist.diff \
patch-daemon-control-dist.diff
python.default_version 27
if { ${os.major} > 11 } {
# https://trac.macports.org/ticket/38084#comment:2
ui_error "${name} requires Lion or older"
return -code error "unsupported OS X version"
reinplace s|/usr/share|${prefix}/share| ${worksrcpath}/setup.py
reinplace s|/usr/share|${prefix}/share| ${worksrcpath}/README.txt
reinplace s|@PYTHON@|${python.bin}| ${worksrcpath}/daemon-control-dist
set bin_path [string map [list python${python.branch} denyhosts.py] ${python.bin}]
reinplace s|@BIN_PATH@|${bin_path}| ${worksrcpath}/daemon-control-dist
reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/daemon-control-dist
reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/denyhosts.cfg-dist
xinstall -d ${destroot}${prefix}/var/run/
xinstall -d ${destroot}${prefix}/var/log/
destroot.keepdirs ${destroot}${prefix}/var/run \
${destroot}${prefix}/var/log
startupitem.pidfile clean ${prefix}/var/run/${name}.pid