diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | addrwatch-git.service | 11 |
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6897cbbf8b0d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = addrwatch-git + pkgdesc = A tool similar to arpwatch for IPv4/IPv6 and ethernet address pairing monitoring + pkgver = 1.0.1.r4.g3ac9f4e + pkgrel = 1 + url = https://github.com/fln/addrwatch + arch = x86_64 + arch = i686 + license = GPL + makedepends = git + depends = libpcap + depends = libevent + provides = addrwatch + conflicts = addrwatch + source = addrwatch-git::git+https://github.com/fln/addrwatch.git + source = addrwatch-git.service + sha512sums = SKIP + sha512sums = 2bc8cdb4b0b8906fd52c5b9e56e1cd2b1d8416a38ced1d33f8b0c9e0f739cde0ecc2e9267e1b1256c0e189fe53c66b69f8ab5a64addb77adf87ffa327f84b5c6 + +pkgname = addrwatch-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3c0f4986c5ad --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# vim:set ts=2 sw=2 et: +# Maintainer: Brian Bidulock <bidulock@openss7.org> + +pkgname=addrwatch-git +_pkgname=addrwatch +pkgver=1.0.1.r4.g3ac9f4e +pkgrel=1 +pkgdesc='A tool similar to arpwatch for IPv4/IPv6 and ethernet address pairing monitoring' +arch=('x86_64' 'i686') +url="https://github.com/fln/addrwatch" +license=('GPL') +depends=('libpcap' 'libevent') +source=("$pkgname::git+https://github.com/fln/$_pkgname.git" + "$pkgname.service") + +makedepends=('git') +provides=($_pkgname) +conflicts=($_pkgname) + +pkgver() { + cd $pkgname + git describe --tags --long | sed 's,\([^-]-g.*\),r\1,;s,-,.,g;s,^[^0-9]*,,' +} + +prepare() { + cd $pkgname + autoreconf -fiv +} + +build() { + cd $pkgname + ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin + make V=0 +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install + install -Dm644 /dev/stdin "$pkgdir"/usr/lib/tmpfiles.d/$_pkgname.conf <<-END + d /var/lib/addrwatch 0755 - - - +END + install -Dm644 ../$pkgname.service "$pkgdir"/usr/lib/systemd/system/${_pkgname}\@.service +} + +sha512sums=('SKIP' + '2bc8cdb4b0b8906fd52c5b9e56e1cd2b1d8416a38ced1d33f8b0c9e0f739cde0ecc2e9267e1b1256c0e189fe53c66b69f8ab5a64addb77adf87ffa327f84b5c6') diff --git a/addrwatch-git.service b/addrwatch-git.service new file mode 100644 index 000000000000..c2a7ba538f1b --- /dev/null +++ b/addrwatch-git.service @@ -0,0 +1,11 @@ +[Unit] +Description=Watch Ethernet/IP paring on interface %i +After=systemd-network-wait-online.service +Wants=systemd-network-wait-online.service + +[Service] +Type=simple +ExecStart=/usr/bin/addrwatch -o /var/lib/addrwatch/%i.dat %i + +[Install] +WantedBy=multi-user.target |