aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Hopkins <george-hopkins@null.net>2021-01-04 10:59:59 +0100
committerRasmus Thomsen <oss@cogitri.dev>2021-01-09 19:29:11 +0000
commit262174f9538b7fe72210ae075ebfc6a32487a448 (patch)
treec3a39fc03359d741198469cbc79287838100abb0
parentc2db512f19dc445913e3733b24bd781524fc8006 (diff)
downloadaports-262174f9538b7fe72210ae075ebfc6a32487a448.tar.gz
aports-262174f9538b7fe72210ae075ebfc6a32487a448.tar.bz2
aports-262174f9538b7fe72210ae075ebfc6a32487a448.tar.xz
testing/kismet: new aport
https://www.kismetwireless.net/ Wireless network and device detector
-rw-r--r--testing/kismet/APKBUILD89
-rw-r--r--testing/kismet/sqlite3-longlong.patch21
2 files changed, 110 insertions, 0 deletions
diff --git a/testing/kismet/APKBUILD b/testing/kismet/APKBUILD
new file mode 100644
index 0000000000..740728bcc1
--- /dev/null
+++ b/testing/kismet/APKBUILD
@@ -0,0 +1,89 @@
+# 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"
diff --git a/testing/kismet/sqlite3-longlong.patch b/testing/kismet/sqlite3-longlong.patch
new file mode 100644
index 0000000000..9fa7d83fd6
--- /dev/null
+++ b/testing/kismet/sqlite3-longlong.patch
@@ -0,0 +1,21 @@
+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);
+ }