source: trunk/dports/security/denyhosts/Portfile

Last change on this file was 126664, checked in by jmr@…, 3 years ago

denyhosts: use unified python portgroup, correct license, mark noarch

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# -*- 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
2# $Id: Portfile 126664 2014-10-13 12:00:26Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                denyhosts
8categories          security sysutils
9version             2.6
10revision            5
11license             GPL-2
12maintainers         snc openmaintainer
13description         DenyHosts is a utility to help sys admins thwart ssh hackers
14long_description    DenyHosts is a python program that automatically blocks ssh\
15                    attacks by adding entries to /etc/hosts.deny. DenyHosts\
16                    will also inform Linux administrators about offending\
17                    hosts, attacked users and suspicious logins.
18
19platforms           darwin freebsd
20supported_archs     noarch
21distname            DenyHosts-${version}
22homepage            http://denyhosts.sourceforge.net/
23master_sites        sourceforge:denyhosts
24
25checksums           rmd160  cab4206af992f5405ed1c9b302341c7b5649c71a \
26                    sha256  5190ead13a7238e3ccf328cb3b71b16716e1c73939909a4f3fa6904ba58ddf7d
27
28patchfiles          patch-denyhosts.cfg-dist.diff \
29                    patch-daemon-control-dist.diff
30
31python.default_version  27
32
33pre-fetch {
34    if { ${os.major} > 11 } {
35        # 10.8 is not supported:
36        # https://trac.macports.org/ticket/38084#comment:2
37        ui_error "${name} requires Lion or older"
38        return -code error "unsupported OS X version"
39    }
40}
41
42build {}
43
44pre-build {
45    reinplace s|/usr/share|${prefix}/share| ${worksrcpath}/setup.py
46    reinplace s|/usr/share|${prefix}/share| ${worksrcpath}/README.txt
47    reinplace s|@PYTHON@|${python.bin}| ${worksrcpath}/daemon-control-dist
48    set bin_path [string map [list python${python.branch} denyhosts.py] ${python.bin}]
49    reinplace s|@BIN_PATH@|${bin_path}| ${worksrcpath}/daemon-control-dist
50    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/daemon-control-dist
51    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/denyhosts.cfg-dist
52}
53
54pre-destroot {
55    xinstall -d ${destroot}${prefix}/var/run/
56    xinstall -d ${destroot}${prefix}/var/log/
57}
58
59destroot.keepdirs   ${destroot}${prefix}/var/run \
60                    ${destroot}${prefix}/var/log
61
62startupitem.create  yes
63startupitem.type    launchd
64startupitem.pidfile clean ${prefix}/var/run/${name}.pid
65startupitem.start   "${prefix}/share/denyhosts/daemon-control start"
66startupitem.stop    "${prefix}/share/denyhosts/daemon-control stop"
67
68notes "
69Please read ${prefix}/share/denyhosts/README.txt.\
70You need to make config files in ${prefix}/share/denyhosts\;\
71the files ending with '-dist' are examples for you to copy.
72"
Note: See TracBrowser for help on using the repository browser.