summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-11-26 15:47:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-11-26 15:47:40 +0000
commit7d407bdce0f6ef149d6fe33342818d4341d0a0f0 (patch)
treeb4b78542c6ba2287664b6009867a500991b21b5c /main
parent6d35b581eba0ef2bf53d26f311d34a380783cc99 (diff)
parent2c8ab2439843faa5af74b9f86a1007cfbd1d1970 (diff)
downloadaports-7d407bdce0f6ef149d6fe33342818d4341d0a0f0.tar.bz2
aports-7d407bdce0f6ef149d6fe33342818d4341d0a0f0.tar.xz
Merge http://git.havela.net/git/aports
Diffstat (limited to 'main')
-rw-r--r--main/perl-carp-clan/APKBUILD36
-rw-r--r--main/perl-date-format/APKBUILD36
-rw-r--r--main/perl-date-manip/APKBUILD34
-rw-r--r--main/perl-devel-symdump/APKBUILD36
-rw-r--r--main/perl-file-tail/APKBUILD36
-rw-r--r--main/perl-pod-coverage/APKBUILD36
-rw-r--r--main/perl-sub-uplevel/APKBUILD35
-rw-r--r--main/perl-test-exception/APKBUILD35
-rw-r--r--main/perl-test-inter/APKBUILD36
-rw-r--r--main/perl-test-pod-coverage/APKBUILD36
-rw-r--r--main/perl-yaml-syck/APKBUILD36
-rw-r--r--main/swatch/APKBUILD58
-rw-r--r--main/swatch/swatch.confd8
-rwxr-xr-xmain/swatch/swatch.initd50
-rw-r--r--main/swatch/swatchrc103
15 files changed, 611 insertions, 0 deletions
diff --git a/main/perl-carp-clan/APKBUILD b/main/perl-carp-clan/APKBUILD
new file mode 100644
index 000000000..e26e5d931
--- /dev/null
+++ b/main/perl-carp-clan/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-carp-clan
+_realname=Carp-Clan
+pkgver=6.04
+pkgrel=0
+pkgdesc="Perl - Report errors from perspective of caller of a 'clan' of modules"
+url="http://search.cpan.org/~stbey/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-test-exception"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/ST/STBEY/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="b6316bc51bb530d994f2784615939fb2 Carp-Clan-6.04.tar.gz"
diff --git a/main/perl-date-format/APKBUILD b/main/perl-date-format/APKBUILD
new file mode 100644
index 000000000..6615a97fb
--- /dev/null
+++ b/main/perl-date-format/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-date-format
+_realname=TimeDate
+pkgver=1.20
+pkgrel=0
+pkgdesc="Perl - Date formating subroutines"
+url="http://search.cpan.org/~gbarr/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="7da7452bce4c684e4238e6d09b390200 TimeDate-1.20.tar.gz"
diff --git a/main/perl-date-manip/APKBUILD b/main/perl-date-manip/APKBUILD
new file mode 100644
index 000000000..34a15d9f1
--- /dev/null
+++ b/main/perl-date-manip/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-date-manip
+_realname=Date-Manip
+pkgver=6.11
+pkgrel=0
+pkgdesc="Perl - Date manipulation routines"
+url="http://search.cpan.org/~sbeck/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-test-pod perl-test-inter perl-yaml-syck perl-test-pod-coverage"
+makedepends="perl-dev"
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ perl Build.PL || return 1
+ ./Build test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ ./Build destdir="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="7880db506f14080635972eb5607fa79d Date-Manip-6.11.tar.gz"
diff --git a/main/perl-devel-symdump/APKBUILD b/main/perl-devel-symdump/APKBUILD
new file mode 100644
index 000000000..16038e9a3
--- /dev/null
+++ b/main/perl-devel-symdump/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-devel-symdump
+_realname=Devel-Symdump
+pkgver=2.08
+pkgrel=0
+pkgdesc="Perl - Dump symbol names or the symbol table"
+url="http://search.cpan.org/~andk/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-test-pod"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="68e3a2f2f989bff295ee63aed5a2a1e5 Devel-Symdump-2.08.tar.gz"
diff --git a/main/perl-file-tail/APKBUILD b/main/perl-file-tail/APKBUILD
new file mode 100644
index 000000000..962373743
--- /dev/null
+++ b/main/perl-file-tail/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-file-tail
+_realname=File-Tail
+pkgver=0.99.3
+pkgrel=0
+pkgdesc="Perl - Extension for reading from continously updated files"
+url="http://search.cpan.org/~mgrabnar/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MG/MGRABNAR/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="ef0fb7bcb4181ba593f4a09940f61d1c File-Tail-0.99.3.tar.gz"
diff --git a/main/perl-pod-coverage/APKBUILD b/main/perl-pod-coverage/APKBUILD
new file mode 100644
index 000000000..cb17f5292
--- /dev/null
+++ b/main/perl-pod-coverage/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-pod-coverage
+_realname=Pod-Coverage
+pkgver=0.20
+pkgrel=0
+pkgdesc="Perl - Checks if the documentation of a module is comprehensive"
+url="http://search.cpan.org/~rclamp/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-devel-symdump perl-test-pod"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/R/RC/RCLAMP/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="292a5b8d3a93597af441d3e6467b8ad6 Pod-Coverage-0.20.tar.gz"
diff --git a/main/perl-sub-uplevel/APKBUILD b/main/perl-sub-uplevel/APKBUILD
new file mode 100644
index 000000000..10e4a49ac
--- /dev/null
+++ b/main/perl-sub-uplevel/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-sub-uplevel
+_realname=Sub-Uplevel
+pkgver=0.22
+pkgrel=0
+pkgdesc="Perl - Apparently run a function in a higher stack frame"
+url="http://search.cpan.org/~dagolden/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl "
+makedepends="perl-dev"
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="c166738a97c0424a0075ebe205d285db Sub-Uplevel-0.22.tar.gz"
diff --git a/main/perl-test-exception/APKBUILD b/main/perl-test-exception/APKBUILD
new file mode 100644
index 000000000..7b276c63d
--- /dev/null
+++ b/main/perl-test-exception/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-test-exception
+_realname=Test-Exception
+pkgver=0.29
+pkgrel=0
+pkgdesc="Perl - Test exception based code"
+url="http://search.cpan.org/~adie/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-sub-uplevel"
+makedepends="perl-dev"
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AD/ADIE/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="9aea475db531d4fd4ce40cf25a0acd14 Test-Exception-0.29.tar.gz"
diff --git a/main/perl-test-inter/APKBUILD b/main/perl-test-inter/APKBUILD
new file mode 100644
index 000000000..29bdf2190
--- /dev/null
+++ b/main/perl-test-inter/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-test-inter
+_realname=Test-Inter
+pkgver=1.01
+pkgrel=0
+pkgdesc="Perl - Framework for more readable interactive test scripts"
+url="http://search.cpan.org/~sbeck/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-test-pod perl-pod-coverage perl-test-pod-coverage"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="445166a7472e609b96e4474d95552827 Test-Inter-1.01.tar.gz"
diff --git a/main/perl-test-pod-coverage/APKBUILD b/main/perl-test-pod-coverage/APKBUILD
new file mode 100644
index 000000000..9a885e0be
--- /dev/null
+++ b/main/perl-test-pod-coverage/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-test-pod-coverage
+_realname=Test-Pod-Coverage
+pkgver=1.08
+pkgrel=0
+pkgdesc="Perl - Check for pod coverage in your distribution."
+url="http://search.cpan.org/~petdance/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl perl-pod-coverage perl-test-pod perl-devel-symdump"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="33405cca7c75b7b89c06ba30eea66692 Test-Pod-Coverage-1.08.tar.gz"
diff --git a/main/perl-yaml-syck/APKBUILD b/main/perl-yaml-syck/APKBUILD
new file mode 100644
index 000000000..d1c628054
--- /dev/null
+++ b/main/perl-yaml-syck/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=perl-yaml-syck
+_realname=YAML-Syck
+pkgver=1.07
+pkgrel=0
+pkgdesc="Perl - Fast, lightweight YAML loader and dumper"
+url="http://search.cpan.org/~audreyt/$_realname-$pkgver/"
+license="Artistic GPL"
+depends="perl"
+makedepends="perl-dev"
+install=
+#subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AU/AUDREYT/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # creates file collision among perl modules
+ find "$pkgdir" -name perllocal.pod -delete
+}
+
+md5sums="410ef7e24185de2a04390e0543876cad YAML-Syck-1.07.tar.gz"
diff --git a/main/swatch/APKBUILD b/main/swatch/APKBUILD
new file mode 100644
index 000000000..9d06df638
--- /dev/null
+++ b/main/swatch/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=swatch
+pkgver=3.2.3
+pkgrel=0
+pkgdesc="Logfile monitoring tool"
+url="http://sourceforge.net/projects/swatch/"
+license="GPL"
+depends="perl perl-date-calc perl-date-format perl-date-manip perl-file-tail perl-carp-clan"
+makedepends="perl-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ swatch.initd
+ swatch.confd
+ swatchrc"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ make realclean || return 1
+
+ # remove perllocal.pod and .packlist
+ find "$pkgdir" -name perllocal.pod -delete
+ find "$pkgdir" -name .packlist -delete
+
+
+#echo "pkdir= $pkgdir"
+#echo "srcdir= $srcdir"
+
+ mkdir -p "$pkgdir"/etc/init.d/
+ mkdir -p "$pkgdir"/etc/conf.d/
+ mkdir -p "$pkgdir"/etc/$pkgname/
+
+ cp "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ cp "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ cp "$srcdir"/${pkgname}rc "$pkgdir"/etc/$pkgname/${pkgname}rc
+
+ chmod 755 "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="1162f1024cf07fc750ed4960d61ac4e8 swatch-3.2.3.tar.gz
+cc99f0831b4a069f90fdedee82495523 swatch.initd
+a02a10a0266781a1ce16cc3b5e84968c swatch.confd
+8a92d37f96982030e0283dc7fe706da8 swatchrc"
diff --git a/main/swatch/swatch.confd b/main/swatch/swatch.confd
new file mode 100644
index 000000000..5cbdc0a20
--- /dev/null
+++ b/main/swatch/swatch.confd
@@ -0,0 +1,8 @@
+## tail-args
+# Arguments for tail program
+tailargs="-n 0 -F"
+
+## script-dir
+# This switch causes the temporary watcher script to be written to a file in the specified directory rather than the user's home directory.
+# It is highly advised that you do NOT use directories that are writable by others such as /tmp.
+scriptdir="/tmp/swatch"
diff --git a/main/swatch/swatch.initd b/main/swatch/swatch.initd
new file mode 100755
index 000000000..ec625e402
--- /dev/null
+++ b/main/swatch/swatch.initd
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+
+# swatch init.d file for alpine linux.
+
+name=swatch
+daemon=/usr/bin/$name
+configfile=/etc/${name}/swatchrc
+tailfile=/var/log/messages
+
+SVC="${SVCNAME#*.}"
+if [ -n "${SVC}" ] && [ "${SVCNAME}" != "${name}" ]; then
+ SVCPID="${name}.${SVC}.pid"
+ configfile="${configfile}.${SVC}"
+ tailfile=$(find /var/log -name "${SVC}" | head -1)
+ [ ! "${tailfile}" ] && tailfile="/var/log/${SVC}"
+else
+ SVCPID="${name}.pid"
+fi
+
+depend() {
+# need net
+ after syslog
+}
+
+start() {
+ ebegin "Starting ${name}"
+ einfo "Preparing to monitor ${tailfile}"
+ if [ ! -e "${tailfile}" ]; then
+ eerror "${tailfile} does not exist"
+ return 1
+ fi
+ if [ ! -e "${configfile}" ]; then
+ eerror "Configfile ${configfile} is missing"
+ return 1
+ fi
+ mkdir -p "${scriptdir}"
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile /var/run/${SVCPID} \
+ --exec ${daemon} -- \
+ --config-file="${configfile}" --script-dir="${scriptdir}" \
+ --tail-file="${tailfile}" --tail-args="${tailargs}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ kill $(ps | grep .swatch_script.$(cat /var/run/${SVCPID}) | grep -v 'grep' | awk '{ print $1}')
+ eend $?
+}
+
diff --git a/main/swatch/swatchrc b/main/swatch/swatchrc
new file mode 100644
index 000000000..3ea2615a9
--- /dev/null
+++ b/main/swatch/swatchrc
@@ -0,0 +1,103 @@
+###############################################################################
+### Swatch example config
+#
+# The configuration file is used by the swatch(8) program to determine what
+# types of expression patterns to look for and what type of action(s) should be
+# taken when a pattern is matched.
+# Each line should contain a keyword and a, sometimes optional, value for that
+# keyword. The keyword and value are separated by a space or an equal (=) sign.
+#
+# watchfor regex
+# ignore regex
+#
+# echo [modes]
+# Echo the matched line. The text mode may be normal, bold, underscore,
+# blink, inverse, black, red, green, yellow, blue, magenta, cyan, white,
+# black_h, red_h, green_h, yellow_h, blue_h, magenta_h, cyan_h,
+# and/or white_h. The _h colors specify a highlighting color. The other
+# colors are assigned to the letters. Some modes may not work on some
+# terminals. Normal is the default.
+# bell [N]
+# Echo the matched line, and send a bell N times (default = 1).
+# exec command
+# Execute command. The command may contain variables which are substituted
+# with fields from the matched line. A $N will be replaced by the Nth field
+# in the line. A $0 or $* will be replaced by the entire line.
+# mail [addresses=address:address:...][,subject=your_text_here]
+# Send mail to address(es) containing the matched lines as they appear
+# (default address is the user who is running the program).
+# pipe command[,keep_open]
+# Pipe matched lines into command. Use the keep_open option to force the
+# pipe to stay open until a different pipe action is run or until swatch
+# exits.
+# write [user:user:...]
+# Use write(1) to send matched lines to user(s).
+# threshold track_by=key, type=<limit|threshold|both, count=number, seconds=number>
+# Thresholding can be done for the complete watchfor block and/or for
+# individual actions. Add ``threshold=on'' as an option along with the other
+# threshold options when thresholding an individual action.
+# track_by
+# The value of this should be something that is unique to the
+# watchfor regular expression. Tip: enclose unique parts of the
+# regular expression in parentheses, then use the sub matches as
+# part of the value (e.g. track_by=``$2:$4'').
+# type
+# There are three types of thresholding. They are as follows:
+# limit
+# Perform action(s) for the first "count`` matches during
+# the time interval specified by ''seconds", then ignore
+# events for the rest of the time interval (kind of like
+# throttle)
+# threshold
+# Perform action(s) on each match for up to count matches
+# during the time interval specified by seconds
+# both
+# Perform actions(s) once per time interval after "count``
+# matches occur, then ignore additional matches during the
+# time interval specified by ''seconds"
+# continue
+# Use this action to cause swatch to continue to try to match other
+# pattern/action groups after it is done with the current pattern/action
+# block.
+# quit
+# Use this action to cause swatch to clean up and quit immediately.
+###############################################################################
+
+## Successful SSH Login Attempts
+watchfor /sshd.*(: [aA]ccepted)(.*)( from )(.*)( port .*)$/
+ threshold track_by=$4,type=limit,count=1,seconds=60
+ echo bold green
+ #mail='receiver@foo.bar',SUBJECT=sshd: Accepted connection,MAILER=sendmail -t -S smtp.foo.bar -f sender\@foo.bar
+
+## Invalid SSH Login Attempts
+watchfor /sshd.*(: [iI]nvalid [uU]ser )(.*)( from )(.*)$/
+ threshold track_by=$4,type=both,count=3,seconds=60
+ echo bold red
+
+## Failed SSH Login Attempts
+watchfor /sshd.*(: [fF]ailed password for )(.*)( from )(.*)( port )(.*)$/
+ threshold track_by=$4,type=both,count=3,seconds=60
+ echo bold red
+
+## Failed SSH Login Attempts
+watchfor /([aA]uthentication [fF]ailure for [iI]llegal [uU]ser )(.*)( from )(.*)$/
+ threshold track_by=$4,type=both,count)3,seconds=60
+ echo bold red
+
+
+## Invalid sudo commands
+watchfor /sudo:.*[Cc]ommand not allowed/
+ echo bold red
+
+## File system full
+watchfor /file system full/
+ echo bold blue
+
+## System crashes and halts
+watchfor /(panic|halt)/
+ echo bold red
+
+## File system errors
+watchfor /[Mm]edia [Ee]rror/
+ echo bold yellow
+