# Description: Monitors MAC Adresses on your network.
# URL: https://ee.lbl.gov/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: libpcap

name=arpwatch
version=3.3
release=1
source=(https://ee.lbl.gov/downloads/$name/$name-$version.tar.gz)

build() {
  cd $name-$version

  # https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/arpwatch
  sed -i 's|ARPDIR = $(prefix)/arpwatch|ARPDIR = /var/lib/arpwatch|' Makefile.in
  sed -i 's/-\(o\|g\) bin/-\1 root/g' Makefile.in

  ./configure --prefix=/usr \
    --sbindir=/usr/bin \
    --mandir=/usr/share/man

  install -d $PKG/usr/{bin,share/man/man8,sbin,etc/rc.d}

  make SENDMAIL=/usr/bin/sendmail
  make DESTDIR=$PKG install
  rm -r $PKG/usr/etc
}
