summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-wireless/kismet/kismet-9999.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-wireless/kismet/kismet-9999.ebuild')
-rw-r--r--net-wireless/kismet/kismet-9999.ebuild167
1 files changed, 167 insertions, 0 deletions
diff --git a/net-wireless/kismet/kismet-9999.ebuild b/net-wireless/kismet/kismet-9999.ebuild
new file mode 100644
index 000000000000..629f220cbdd6
--- /dev/null
+++ b/net-wireless/kismet/kismet-9999.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib user
+
+MY_P=${P/\./-}
+MY_P=${MY_P/./-R}
+S=${WORKDIR}/${MY_P}
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git"
+ SRC_URI=""
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
+HOMEPAGE="http://www.kismetwireless.net/"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+IUSE="+client +pcre speech +plugin-autowep +plugin-btscan plugin-dot15d4 +plugin-ptw +plugin-spectools +plugin-syslog +ruby selinux +suid"
+
+CDEPEND="net-wireless/wireless-tools
+ kernel_linux? ( sys-libs/libcap
+ dev-libs/libnl:3
+ net-libs/libpcap
+ )
+ pcre? ( dev-libs/libpcre )
+ suid? ( sys-libs/libcap )
+ client? ( sys-libs/ncurses )
+ !arm? ( speech? ( app-accessibility/flite ) )
+ ruby? ( dev-lang/ruby:* )
+ plugin-btscan? ( net-wireless/bluez )
+ plugin-dot15d4? ( virtual/libusb:0 )
+ plugin-spectools? ( net-wireless/spectools )
+"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-kismet )
+"
+
+src_prepare() {
+ sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \
+ conf/kismet.conf.in
+
+ # Don't strip and set correct mangrp
+ sed -i -e 's| -s||g' \
+ -e 's|@mangrp@|root|g' Makefile.in
+}
+
+src_configure() {
+ econf \
+ $(use_enable client) \
+ $(use_enable pcre)
+}
+
+src_compile() {
+ emake
+
+ if use plugin-autowep; then
+ cd "${S}"/restricted-plugin-autowep
+ KIS_SRC_DIR="${S}" emake
+ fi
+ if use plugin-btscan; then
+ cd "${S}"/plugin-btscan
+ KIS_SRC_DIR="${S}" emake
+ fi
+ if use plugin-dot15d4; then
+ cd "${S}"/plugin-dot15d4
+ KIS_SRC_DIR="${S}" emake
+ fi
+ if use plugin-ptw; then
+ cd "${S}"/restricted-plugin-ptw
+ KIS_SRC_DIR="${S}" emake
+ fi
+ if use plugin-spectools; then
+ cd "${S}"/plugin-spectools
+ KIS_SRC_DIR="${S}" emake
+ fi
+ if use plugin-syslog; then
+ cd "${S}"/plugin-syslog
+ KIS_SRC_DIR="${S}" emake
+ fi
+}
+
+src_install() {
+ if use plugin-autowep; then
+ cd "${S}"/restricted-plugin-autowep
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use plugin-btscan; then
+ cd "${S}"/plugin-btscan
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use plugin-dot15d4; then
+ cd "${S}"/plugin-dot15d4
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use plugin-ptw; then
+ cd "${S}"/restricted-plugin-ptw
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use plugin-spectools; then
+ cd "${S}"/plugin-spectools
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use plugin-syslog; then
+ cd "${S}"/plugin-syslog
+ KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
+ fi
+ if use ruby; then
+ cd "${S}"/ruby
+ dobin *.rb
+ fi
+
+ cd "${S}"
+ emake DESTDIR="${D}" commoninstall
+
+ ##dragorn would prefer I set fire to my head than do this, but it works
+ ##all external kismet plugins (read: kismet-ubertooth) must be rebuilt when kismet is
+ ##is there an automatic way to force this?
+ # install headers for external plugins
+ insinto /usr/include/kismet
+ doins *.h
+ doins Makefile.inc
+ #todo write a plugin finder that tells you what needs to be rebuilt when kismet is updated, etc
+
+ dodoc CHANGELOG RELEASENOTES.txt README* docs/DEVEL.client docs/README.newcore
+ newinitd "${FILESDIR}"/${PN}.initd kismet
+ newconfd "${FILESDIR}"/${PN}.confd kismet
+
+ insinto /etc
+ doins conf/kismet{,_drone}.conf
+
+ if use suid; then
+ dobin kismet_capture
+ fi
+}
+
+pkg_preinst() {
+ if use suid; then
+ enewgroup kismet
+ fowners root:kismet /usr/bin/kismet_capture
+ # Need to set the permissions after chowning.
+ # See chown(2)
+ fperms 4550 /usr/bin/kismet_capture
+ elog "Kismet has been installed with a setuid-root helper binary"
+ elog "to enable minimal-root operation. Users need to be part of"
+ elog "the 'kismet' group to perform captures from physical devices."
+ fi
+ if ! use suid; then
+ ewarn "It is highly discouraged to run a sniffer as root,"
+ ewarn "Please consider enabling the suid use flag and adding"
+ ewarn "your user to the kismet group."
+ fi
+}