[92144] trunk/dports/net
pixilla at macports.org
pixilla at macports.org
Thu Apr 19 20:11:43 PDT 2012
Revision: 92144
https://trac.macports.org/changeset/92144
Author: pixilla at macports.org
Date: 2012-04-19 20:11:40 -0700 (Thu, 19 Apr 2012)
Log Message:
-----------
net/sshguard:
New port for sshguard. There currently is an sshguard-ipfw port
which configures sshguard for use with the ipfw firewall. With
Mac OS X Lion Apple has moved to the pf (packet filter) firewall.
This port configures sshguard for ipfw for pre Lion OS's and pf
for the rest.
Added Paths:
-----------
trunk/dports/net/sshguard/
trunk/dports/net/sshguard/Portfile
trunk/dports/net/sshguard/files/
trunk/dports/net/sshguard/files/options.example
trunk/dports/net/sshguard/files/sshguard-launchd
Added: trunk/dports/net/sshguard/Portfile
===================================================================
--- trunk/dports/net/sshguard/Portfile (rev 0)
+++ trunk/dports/net/sshguard/Portfile 2012-04-20 03:11:40 UTC (rev 92144)
@@ -0,0 +1,76 @@
+# -*- 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$
+
+PortSystem 1.0
+
+name sshguard
+conflicts sshguard-ipfw
+version 1.5
+categories net security
+platforms darwin
+maintainers otherware.org:nefar pixilla openmaintainer
+license BSD
+
+description Sshguard protects networked hosts from brute force attacks.
+
+long_description Sshguard monitors servers from their logging activity. When logs convey \
+ that someone is doing a Bad Thing, sshguard reacts by blocking he/she/it \
+ for a bit. Sshguard has a touchy personality: when a naughty tyke \
+ insists disturbing your host, it reacts firmer and firmer.
+
+homepage http://www.sshguard.net/
+master_sites sourceforge:sshguard
+
+distname sshguard-${version}
+
+checksums rmd160 7b4625b3b2e0cf974bc935d868b89bd0d8c189e8 \
+ sha256 b537f8765455fdf8424f87d4bd695e5b675b88e5d164865452137947093e7e19
+
+use_bzip2 yes
+
+if {${os.major} < 11} {
+ configure.args-append \
+ --with-ipfw=/sbin/ipfw --with-firewall=ipfw
+} else {
+ configure.args-append \
+ --with-pfctl=/sbin/pfctl --with-firewall=pf
+}
+
+post-extract {
+ copy ${filespath}/sshguard-launchd \
+ ${worksrcpath}/sshguard-launchd
+ reinplace "s|@PREFIX@|${prefix}|" \
+ ${worksrcpath}/sshguard-launchd
+}
+
+post-destroot {
+ xinstall -d ${destroot}${prefix}/etc/${name}
+ xinstall -d ${destroot}${prefix}/libexec/${name}
+ xinstall -d ${destroot}${prefix}/share/${name}
+ xinstall -m 644 ${filespath}/options.example \
+ ${destroot}${prefix}/etc/${name}/options.example
+ xinstall -m 755 ${worksrcpath}/sshguard-launchd \
+ ${destroot}${prefix}/libexec/${name}/sshguard-launchd
+ xinstall -m 544 ${worksrcpath}/README \
+ ${destroot}${prefix}/share/${name}/README
+}
+
+post-activate {
+ if {![file exists ${prefix}/etc/${name}/options]} {
+ xinstall -m 644 ${prefix}/etc/${name}/options.example \
+ ${prefix}/etc/${name}/options
+ }
+}
+
+startupitem.create yes
+startupitem.executable "${prefix}/libexec/${name}/sshguard-launchd"
+
+livecheck.type regex
+livecheck.url http://sourceforge.net/projects/sshguard/files/sshguard/
+livecheck.regex "/sshguard-(\\d+(?:\\.\\d+)*)/"
+
+notes "
+You can add log files to monitor by adding '-l /path/to/file.log' lines to ${prefix}/etc/${name}/options.
+Then load ${name}:
+$ sudo port load ${name}
+"
\ No newline at end of file
Added: trunk/dports/net/sshguard/files/options.example
===================================================================
--- trunk/dports/net/sshguard/files/options.example (rev 0)
+++ trunk/dports/net/sshguard/files/options.example 2012-04-20 03:11:40 UTC (rev 92144)
@@ -0,0 +1,2 @@
+-l /var/log/system.log
+-l /var/log/secure.log
Added: trunk/dports/net/sshguard/files/sshguard-launchd
===================================================================
--- trunk/dports/net/sshguard/files/sshguard-launchd (rev 0)
+++ trunk/dports/net/sshguard/files/sshguard-launchd 2012-04-20 03:11:40 UTC (rev 92144)
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+OPTIONS=$(tr '\n' ' ' < @PREFIX@/etc/sshguard/options)
+ at PREFIX@/sbin/sshguard ${OPTIONS}
Property changes on: trunk/dports/net/sshguard/files/sshguard-launchd
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120419/bb94a2fa/attachment.html>
More information about the macports-changes
mailing list