summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c2f2a9de7caae06429baf2d17ac7ce3152842423 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Maintainer: solsTiCe d'Hiver <solstice.dhiver@gmail.com>
# Contributor: Alexander Paetzelt <techge+arch [├Ąt] posteo [do] net>

pkgname=kismet-git
pkgver=r11487.59f51a2da
pkgrel=2
pkgdesc="802.11 layer2 wireless network detector, sniffer, and intrusion detection system"
url="https://www.kismetwireless.net/"
arch=('x86_64' 'armv7h' 'aarch64')
license=('GPL')
depends=('bluez-libs'
        'gcc-libs'
        'glibc'
        'libcap'
        'libelf'
        'libnl'
        'libnm'
        'libcap-ng'
        'libnm'
        'libpcap'
        'libusb'
        'libwebsockets'
        'lm_sensors'
        'mosquitto'
        'pcre'
        'protobuf'
        'protobuf-c'
        'python'
        'python-protobuf'
        'python-pyserial'
        'python-numpy'
        'python-websockets'
        'sqlite'
        'systemd'
        'zlib')
makedepends=('git' 'python-setuptools')
optdepends=('festival: text-to-speech support'
        'flite:  alternative/lightweight text-to-speech support'
        'gpsd: log coordinates of detected networks'
        'hackrf: use with HackRF compatible software defined radio (SDR)'
        'sox: provide the default kismet sound playback binary'
        'wireshark-cli: provide OUI files used to determine device manufacturer'
        'wireshark-cli: mergecap, to merge multiple capture files',
        'libbtbb: bluetooth baseband decoding library')
backup=(etc/kismet/kismet.conf
        etc/kismet/kismet_80211.conf
        etc/kismet/kismet_alerts.conf
        etc/kismet/kismet_filter.conf
        etc/kismet/kismet_httpd.conf
        etc/kismet/kismet_logging.conf
        etc/kismet/kismet_memory.conf
        etc/kismet/kismet_uav.conf)
conflicts=('kismet')
install=${pkgname}.install
source=("git+https://github.com/kismetwireless/kismet"
        "${pkgname}-sysusers.conf")
sha256sums=('SKIP'
        '0ac08bf5016e00596e2fc0bc89e7907c2186b811ed8d8a2bffe6b95b42e147a3')

pkgver() {
    cd "$srcdir/kismet"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/kismet"
    # patch setup.py install command
    find . -name Makefile.in -exec sed -i 's/setup.py install/setup.py install -O1/' {} \;
}

build() {
    cd "$srcdir/kismet"
    ./configure --prefix=/usr \
        --localstatedir=/var \
        --sysconfdir=/etc/kismet \
        --with-suidgroup=315
    make all plugins
}

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

    # Makepkg strip bug #43600
    chmod u+w "${pkgdir}"/usr/bin/kismet*
    chmod o-x "${pkgdir}"/usr/bin/kismet_cap*
    chown 0:315 "${pkgdir}"/usr/bin/kismet_cap*

    # create group kismet via sysusers
    cd "$srcdir"
    install -vDm 644 "${pkgname}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
}