# -*- 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: Portfile 126664 2014-10-13 12:00:26Z jmr@macports.org $ PortSystem 1.0 PortGroup python 1.0 name denyhosts categories security sysutils version 2.6 revision 5 license GPL-2 maintainers snc 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. platforms darwin freebsd supported_archs noarch 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 pre-fetch { if { ${os.major} > 11 } { # 10.8 is not supported: # https://trac.macports.org/ticket/38084#comment:2 ui_error "${name} requires Lion or older" return -code error "unsupported OS X version" } } build {} pre-build { 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 } pre-destroot { xinstall -d ${destroot}${prefix}/var/run/ xinstall -d ${destroot}${prefix}/var/log/ } destroot.keepdirs ${destroot}${prefix}/var/run \ ${destroot}${prefix}/var/log startupitem.create yes startupitem.type launchd startupitem.pidfile clean ${prefix}/var/run/${name}.pid startupitem.start "${prefix}/share/denyhosts/daemon-control start" startupitem.stop "${prefix}/share/denyhosts/daemon-control stop" notes " Please read ${prefix}/share/denyhosts/README.txt.\ You need to make config files in ${prefix}/share/denyhosts\;\ the files ending with '-dist' are examples for you to copy. "