diff options
author | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
commit | 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch) | |
tree | 03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/arpwatch | |
parent | e445a313723389ba9ee1fded025c567dae5b21ea (diff) |
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/arpwatch')
-rw-r--r-- | community/arpwatch/LICENSE | 18 | ||||
-rw-r--r-- | community/arpwatch/PKGBUILD | 48 | ||||
-rw-r--r-- | community/arpwatch/arpwatch.service | 11 |
3 files changed, 77 insertions, 0 deletions
diff --git a/community/arpwatch/LICENSE b/community/arpwatch/LICENSE new file mode 100644 index 000000000..be49954d9 --- /dev/null +++ b/community/arpwatch/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 1992, 1993, 1994, 1995, 1996, 1998, 2000 + The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that: (1) source code distributions +retain the above copyright notice and this paragraph in its entirety, (2) +distributions including binary code include the above copyright notice and +this paragraph in its entirety in the documentation or other materials +provided with the distribution, and (3) all advertising materials mentioning +features or use of this software display the following acknowledgement: +``This product includes software developed by the University of California, +Lawrence Berkeley Laboratory and its contributors.'' Neither the name of +the University nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior +written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/community/arpwatch/PKGBUILD b/community/arpwatch/PKGBUILD new file mode 100644 index 000000000..b99a70eda --- /dev/null +++ b/community/arpwatch/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 91484 2013-05-23 10:11:13Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Sébastien Luttringer + +pkgname=arpwatch +pkgver=2.1a15 +pkgrel=11 +pkgdesc='Ethernet/FDDI station activity monitor' +arch=('i686' 'x86_64') +url='ftp://ftp.ee.lbl.gov/' +license=('BSD') +depends=('libpcap' 'smtp-forwarder') +source=("ftp://ftp.ee.lbl.gov/$pkgname-$pkgver.tar.gz" + 'LICENSE' + "$pkgname.service") +md5sums=('cebfeb99c4a7c2a6cee2564770415fe7' + '9359518c500562281e76cdb0b2fa9062' + '43e2358ba0532da38e5296250a7fcfd8') + +prepare() { + cd $pkgname-$pkgver + # move arp database in /var/lib/arpwatch + sed -i 's|ARPDIR = $(prefix)/arpwatch|ARPDIR = /var/lib/arpwatch|' Makefile.in + # binary ownership to root + sed -i 's/-\(o\|g\) bin/-\1 root/g' Makefile.in +} + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin + make SENDMAIL=`which sendmail` +} + +package() { + cd $pkgname-$pkgver + install -d -m 0755 "$pkgdir"/usr/{bin,share/man} + make DESTDIR="$pkgdir" install install-man + # install ether prefix database + install -Dm644 ethercodes.dat "$pkgdir/var/lib/$pkgname/ethercodes.dat" + cd "$srcdir" + # license + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + # systemd + install -Dm644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname@.service" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/arpwatch/arpwatch.service b/community/arpwatch/arpwatch.service new file mode 100644 index 000000000..ede31f3f7 --- /dev/null +++ b/community/arpwatch/arpwatch.service @@ -0,0 +1,11 @@ +[Unit] +Description=Watch ARP on interface %I +After=network.target + +[Service] +Type=forking +ExecStartPre=/usr/bin/touch /var/lib/arpwatch/%I.dat +ExecStart=/usr/bin/arpwatch -f /var/lib/arpwatch/%I.dat -i %I + +[Install] +WantedBy=multi-user.target |