source: trunk/dports/net/sshguard/Portfile

Last change on this file was 148201, checked in by dluke@…, 19 months ago

sshguard: version bump, update to 1.6.4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 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 148201 2016-04-29 18:58:09Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           bitbucket 1.0
6
7bitbucket.setup     sshguard sshguard 1.6.4 v
8
9categories          net security
10platforms           darwin
11maintainers         pixilla openmaintainer
12license             BSD
13
14description         Sshguard protects networked hosts from brute force attacks.
15
16long_description    Sshguard monitors servers from their logging activity. When logs convey \
17                    that someone is doing a Bad Thing, sshguard reacts by blocking he/she/it \
18                    for a bit. Sshguard has a touchy personality: when a naughty tyke \
19                    insists disturbing your host, it reacts firmer and firmer.
20
21homepage            http://www.sshguard.net/
22
23checksums           rmd160  0d9e9f80c52d3d9cdce1191c70e879c19bfe3af5 \
24                    sha256  76a2c6f365e417b1ae1dfc12fd20ac2b7e4d428cab0764eeebac45786840ea6e
25
26use_autoreconf      yes
27
28# Before Lion firewall is ipfw, afterwards pf.
29if {${os.major} < 11} {
30
31    configure.args-append \
32                    --with-ipfw=/sbin/ipfw --with-firewall=ipfw
33} else {
34
35    configure.args-append \
36                    --with-pfctl=/sbin/pfctl --with-firewall=pf
37}
38
39post-extract {
40
41    copy ${filespath}/sshguard-options-wrapper \
42        ${worksrcpath}/sshguard-options-wrapper
43    copy ${filespath}/options.example \
44        ${worksrcpath}/options.example
45    reinplace "s|@PREFIX@|${prefix}|" \
46        ${worksrcpath}/sshguard-options-wrapper \
47        ${worksrcpath}/options.example
48    reinplace "s|@NAME@|${name}|" \
49        ${worksrcpath}/sshguard-options-wrapper \
50        ${worksrcpath}/options.example
51}
52
53post-destroot {
54
55    xinstall -d ${destroot}${prefix}/etc/${name}
56    xinstall -d ${destroot}${prefix}/libexec/${name}
57    xinstall -d ${destroot}${prefix}/share/${name}
58    xinstall -d ${destroot}${prefix}/var/db/${name}
59    xinstall -m 644 ${worksrcpath}/options.example \
60        ${destroot}${prefix}/etc/${name}/options.example
61    xinstall -m 755 ${worksrcpath}/sshguard-options-wrapper \
62        ${destroot}${prefix}/libexec/${name}/sshguard-options-wrapper
63    xinstall -m 544 ${worksrcpath}/README.rst \
64        ${destroot}${prefix}/share/${name}/README.rst
65    touch ${destroot}${prefix}/var/db/${name}/keepdir
66}
67
68post-activate {
69
70    if {![file exists ${prefix}/etc/${name}/options]} {
71        xinstall -m 644 ${prefix}/etc/${name}/options.example \
72            ${prefix}/etc/${name}/options
73    }
74    if {![file exists ${prefix}/etc/${name}/whitelist]} {
75        touch ${prefix}/etc/${name}/whitelist
76    }
77}
78
79startupitem.create      yes
80startupitem.executable  "${prefix}/libexec/${name}/sshguard-options-wrapper"
81
82livecheck.type      regex
83livecheck.url       http://sourceforge.net/projects/sshguard/files/sshguard/
84livecheck.regex     "/sshguard-(\\d+(?:\\.\\d+)*)/"
85
86notes "
87
88* This port installs a wrapper script \"sshguard-options-wrapper\" to
89facilitate the use of an options file with launchd.
90
91* You can add log files to monitor by adding '-l /path/to/file.log'
92lines to ${prefix}/etc/${name}/options.
93
94* You can white list ip addresses and hostnames by editing
95${prefix}/etc/${name}/whitelist.
96Example:
97    # comment line (a '#' as very first character)
98    #   a single ip address
99    1.2.3.4
100    #   address blocks in CIDR notation
101    127.0.0.0/8
102    10.11.128.0/17
103    192.168.0.0/24
104    #   hostnames
105    rome-fw.enterprise.com
106    hosts.friends.com
107
108* You can load ${name} with this command:
109$ sudo port load ${name}
110
111"
Note: See TracBrowser for help on using the repository browser.