# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{13..14} ) inherit autotools eapi9-ver python-single-r1 udev systemd if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="https://www.kismetwireless.net/git/${PN}.git" inherit git-r3 else MY_P=${P/\./-} MY_P=${MY_P/_beta/-BETA} MY_P=${MY_P/./-R} S=${WORKDIR}/${MY_P/BETA/beta} #normally we want an official release SRC_URI="https://www.kismetwireless.net/code/${MY_P}.tar.xz" #but sometimes we want a git commit #COMMIT="9ca7e469cf115469f392db7436816151867e1654" #SRC_URI="https://github.com/kismetwireless/kismet/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" #S="${WORKDIR}/${PN}-${COMMIT}" KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" fi DESCRIPTION="IEEE 802.11 wireless LAN sniffer" HOMEPAGE="https://www.kismetwireless.net" LICENSE="GPL-2" SLOT="0/${PV}" IUSE="libusb lm-sensors mqtt networkmanager +pcre protobuf rtlsdr selinux +suid ubertooth udev +wext" REQUIRED_USE="${PYTHON_REQUIRED_USE}" # upstream said protobuf-26.1 breaks everything # 2026.10.1 should be the last release with protobuf support CDEPEND=" ${PYTHON_DEPS} app-arch/xz-utils app-arch/zstd mqtt? ( app-misc/mosquitto ) networkmanager? ( net-misc/networkmanager ) dev-libs/glib:2 dev-libs/elfutils dev-libs/openssl:= virtual/zlib:= dev-db/sqlite:3 >=net-libs/libwebsockets-4.5.8-r1:=[client,lejp] kernel_linux? ( sys-libs/libcap dev-libs/libnl:3 net-libs/libpcap ) libusb? ( virtual/libusb:1 ) protobuf? ( dev-libs/protobuf-c:= /dev/null)" ]; then ewarn "Files at /etc/kismet_*.conf will not be read and should be removed" fi if [ -f "${EROOT}/etc/kismet_site.conf" ] && [ ! -f "${EROOT}/etc/kismet/kismet_site.conf" ]; then mv /etc/kismet_site.conf /etc/kismet/kismet_site.conf || die "Failed to migrate kismet_site.conf to new location" ewarn "Your /etc/kismet_site.conf file has been automatically moved to /etc/kismet/kismet_site.conf" elif [ -f "${EROOT}/etc/kismet_site.conf" ] && [ -f "${EROOT}/etc/kismet/kismet_site.conf" ]; then ewarn "Both /etc/kismet_site.conf and /etc/kismet/kismet_site.conf exist, please migrate needed bits" ewarn "into /etc/kismet/kismet_site.conf and remove /etc/kismet_site.conf" fi } pkg_postinst() { if ver_replacing -lt 2019.07.2 || ver_replacing -eq 9999; then migrate_config fi udev_reload } pkg_postrm() { udev_reload }