1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
12 DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
13 HOMEPAGE="http://www.kismetwireless.net/"
14 SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz"
18 KEYWORDS="~amd64 ~arm ~ppc ~x86"
20 KISMET_PLUGINS="autowep btscan ptw spectools"
21 IUSE="+client kernel_linux +pcre +pcap +suid ${KISMET_PLUGINS}"
23 RDEPEND="btscan? ( net-wireless/bluez )
24 client? ( sys-libs/ncurses )
29 pcap? ( net-libs/libpcap )
30 pcre? ( dev-libs/libpcre )
31 ptw? ( dev-libs/openssl )"
38 sed -i -e 's:# *logprefix=.*:logprefix=/tmp:' conf/kismet.conf.in \
39 || die "failed to change logprefix"
43 econf --with-suidgroup=kismet \
44 $(use_enable client) \
45 $(use_enable kernel_linux linuxwext) \
51 emake || die "emake failed"
53 for plugin in ${KISMET_PLUGINS}; do
54 if use ${plugin}; then
55 emake -C plugin-${plugin} KIS_SRC_DIR="${S}" \
56 || die "emake in plugin-${plugin} failed"
62 emake DESTDIR="${D}" commoninstall || die "emake install failed"
64 for plugin in ${KISMET_PLUGINS}; do
65 if use ${plugin}; then
66 emake -C plugin-${plugin} KIS_SRC_DIR="${S}" DESTDIR="${D}" install \
67 || die "emake install in plugin-${plugin} failed"
71 dodoc README RELEASENOTES.txt docs/{DEVEL.client,README.newcore} || die
74 doins conf/kismet{,_drone}.conf || die
76 newinitd "${FILESDIR}"/${PN}.initd kismet || die
77 newconfd "${FILESDIR}"/${PN}.confd kismet || die
80 dobin kismet_capture || die
87 fowners root:kismet /usr/bin/kismet_capture || die
88 # Need to set the permissions after chowning.
90 fperms 4550 /usr/bin/kismet_capture || die
91 elog "Kismet has been installed with a setuid-root helper binary"
92 elog "to enable minimal-root operation. Users need to be part of"
93 elog "the 'kismet' group to perform captures from physical devices."