summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76064c60ac92abbdf9e2920ef861812035b4da6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer  :               Kr1ss              <kr1ss.x@yandex.com>
# Contributor (kismet-git) :  Alexander Paetzelt <techge+arch [ät] posteo [do] net>


pkgname=kismet-ng
pkgver=2019.04.R1
pkgrel=7
_pkgname=${pkgname%-ng}
_srcname="$(sed 's/\./-/g' <<<"$_pkgname-$pkgver")"

pkgdesc='WiFi detector, sniffer, and intrusion detection framework - major rewrite'
arch=('x86_64')
url='https://www.kismetwireless.net'
license=('GPL' 'custom')

depends=('libelf' 'libmicrohttpd' 'libnm' 'libpcap' 'pkg-config' 'protobuf-c' 'lm_sensors')
makedepends=('rsync')
optdepends=('hackrf: use with HackRF compatible software defined radio [SDR]')

provides=('kismet')
conflicts=('kismet' 'kismet-git')

backup=('etc/kismet/kismet.conf' 'etc/kismet/kismet_alerts.conf'
        'etc/kismet/kismet_httpd.conf' 'etc/kismet/kismet_logging.conf'
        'etc/kismet/kismet_memory.conf' 'etc/kismet/kismet_storage.conf')

install="$_pkgname.install"
source=("$url/code/$_srcname.tar.xz"
        "$_pkgname-docs.zip::https://github.com/kismetwireless/$_pkgname-docs/archive/master.zip"
        "$_pkgname-sysusers.conf")

sha256sums=('60575e3473abc2a60c583a10b3e386c547f54e720140ab9de6130de5590a7790'
            '4f4ce0bcd8b3e0c2c2e5ced2ac8fba85a53a289cf33adfdc3ad27cd6d2375752'
            '8b5b25bb6d9c611589ce0200da3cfeed2194bfa45aeed88e10c980c668383806')
validpgpkeys=('7A194E3F7A8F867BEA8A5339023F078862ACFE50')

build() {
    cd "$_srcname"
    ./configure --prefix=/usr --sysconfdir=/etc/kismet --disable-python-tools
    make
}

package() {
    cd "$_srcname"
    make DESTDIR="$pkgdir/" install

    # install capture_tools suid so that network devices can be
    # handled by capture tools when kismet is started as user
    install -oroot -g315 -m4550 -t"$pkgdir/usr/bin/" capture_linux_wifi/kismet_cap_linux_wifi capture_linux_bluetooth/kismet_cap_linux_bluetooth

    # install docs / license
    install -Dm644 -t"$pkgdir/usr/share/licenses/$_pkgname/" LICENSE
    install -dm755 "$pkgdir/usr/share/doc/$_pkgname/"
    rsync -rp "../$_pkgname-docs-master/"* "$pkgdir/usr/share/doc/$_pkgname/"

    # create group kismet via sysusers
    install -Dm644 "../$_pkgname-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
}