# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=kismet
pkgver=2019_08_R1
_realver="${pkgver//_/-}"
pkgrel=1
pkgdesc="802.11 layer2 wireless network detector, sniffer, and intrusion detection system"
arch=('x86_64')
url="https://www.kismetwireless.net/"
license=('GPL')
depends=('libpcap' 'pcre' 'bluez-libs' 'libcap' 'libmicrohttpd' 'protobuf-c' 'sqlite')
optdepends=('gpsd: log coordinates of detected networks'
            'wireshark-cli: provide OUI files used to determine device manufacturer'
            'wireshark-cli: mergecap, to merge multiple capture files'
            'sox: provide the default kismet sound playback binary'
            'festival: text-to-speech support'
            'flite:  alternative/lightweight text-to-speech support'
            'ruby: ruby interface')
backup=('etc/kismet.conf')
install=kismet.install
source=("https://www.kismetwireless.net/code/${pkgname}-${_realver}.tar.xz")
sha256sums=('3a0bde964f34c5eceaa085b9f1dc4eb008a4ce3a38b68bec6d962d3404a0d96b')
validpgpkeys=('354689DF3C9DED803381A661D7B28822738BBDB1') # Michael Kershaw

build() {
  cd ${pkgname}-${_realver}
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-python-tools
  make all plugins
}

package() {
  cd ${pkgname}-${_realver}
  make DESTDIR="$pkgdir" install
  # Makepkg strip bug #43600
  chmod u+w "${pkgdir}"/usr/bin/kismet*
}

# vim: ts=2 sw=2 et:
