Commit 262174f9 authored by George Hopkins's avatar George Hopkins Committed by Rasmus Thomsen

testing/kismet: new aport

https://www.kismetwireless.net/
Wireless network and device detector
parent c2db512f
# Contributor: George Hopkins <george-hopkins@null.net>
# Maintainer: George Hopkins <george-hopkins@null.net>
pkgname=kismet
_pkgver=2020-12-R3
pkgver=${_pkgver/-R/.}
pkgver=0.${pkgver/-/}
pkgrel=0
pkgdesc="Wireless network and device detector"
url="https://www.kismetwireless.net/"
arch="all"
license="GPL-2.0-only"
makedepends="linux-headers libnl3-dev libpcap-dev protobuf-dev protobuf-c-dev
sqlite-dev zlib-dev"
subpackages="$pkgname-logtools
$pkgname-linux-bluetooth:linux_bluetooth
$pkgname-linux-wifi:linux_wifi
$pkgname-nrf-51822:nrf_51822
$pkgname-nxp-kw41z:nxp_kw41z
"
options="!check" # no test-suite available
source="$pkgname-$pkgver.tar.xz::https://www.kismetwireless.net/code/kismet-$_pkgver.tar.xz
sqlite3-longlong.patch
"
builddir="$srcdir"/kismet-$_pkgver
prepare() {
default_prepare
update_config_sub
sed -i "s/@VERSION@/$pkgver/" packaging/kismet.pc.in
}
build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc/kismet \
--disable-libusb \
--disable-libwebsockets \
--disable-python-tools
make
}
package() {
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/bin/kismet_discovery # example
}
logtools() {
pkgdesc="$pkgdesc - log tools"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kismetdb_* "$subpkgdir"/usr/bin
}
linux_bluetooth() {
pkgdesc="$pkgdesc - Bluetooth capture support"
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kismet_cap_linux_bluetooth "$subpkgdir"/usr/bin
}
linux_wifi() {
pkgdesc="$pkgdesc - Wi-Fi capture support"
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kismet_cap_linux_wifi "$subpkgdir"/usr/bin
}
nrf_51822() {
pkgdesc="$pkgdesc - nRF51822 capture support"
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kismet_cap_nrf_51822 "$subpkgdir"/usr/bin
}
nxp_kw41z() {
pkgdesc="$pkgdesc - NXP KW41Z capture support"
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kismet_cap_nxp_kw41z "$subpkgdir"/usr/bin
}
sha512sums="6c4c95a9963977d5a383e34f662f814a803d0d36d7dbc35d3d0a42d3e67c20e8d46357df0ee544b8dd3c7f527bd43ef9c0d913577d4979f261764fc9761cd6d1 kismet-0.202012.3.tar.xz
1f49cf45963f32b1eaec9b15e5cab53f46999362f87daf9b39f8f244fa3dd1ac602f0a22eb04682a3a22abcaf2b09fc59060ff12626844e77125b6a28e4350bd sqlite3-longlong.patch"
On some systems time_t is defined as long long. In this case, the
current release does not contain the appropriate getter to read
values of this type from the database.
https://github.com/kismetwireless/kismet/pull/334
diff -ru a/sqlite3_cpp11.cc b/sqlite3_cpp11.cc
--- a/sqlite3_cpp11.cc 2020-12-06 21:24:46.000000000 +0100
+++ b/sqlite3_cpp11.cc 2021-01-04 11:21:17.239367923 +0100
@@ -412,6 +412,11 @@
}
template<>
+ long long sqlite3_column_as(std::shared_ptr<sqlite3_stmt> stmt, unsigned int column) {
+ return (long long) sqlite3_column_int64(stmt.get(), column);
+ }
+
+ template<>
unsigned long long sqlite3_column_as(std::shared_ptr<sqlite3_stmt> stmt, unsigned int column) {
return (unsigned long long) sqlite3_column_int64(stmt.get(), column);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment