# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 55799 2009-08-19 13:13:54Z snc@macports.org $

PortSystem          1.0

name                kismet
version             2009-06-R1
description         Wireless network detector and sniffer
long_description    Kismet is an 802.11 layer2 wireless network detector, \
                    sniffer, and intrusion detection system.  Kismet will work \
                    with any wireless card which supports raw monitoring \
                    (rfmon) mode, and can sniff 802.11b, 802.11a, 802.11n, and \
                    802.11g traffic (devices and drivers permitting). It can \
                    work with MacBook and MacBook Pro Atheros-based cards with \
                    which currently KisMac is unable to. Kismet identifies \
                    networks by passively collecting packets and detecting \
                    standard named networks, detecting (and given time, \
                    decloaking) hidden networks, and inferring the presence of \
                    non-beaconing networks via data traffic.
#license             GPL
maintainers         snc openmaintainer
categories          net
platforms           darwin

homepage            http://www.kismetwireless.net/
master_sites        ${homepage}code

checksums           md5     8d77138020ace39f175a906dc0d3b267 \
                    sha1    e5f9f51762e98c457c2ecdd8b04ac19f30105435 \
                    rmd160  fe4e4c06ae6763937167e1e0fe8890ab3a6af74d

depends_lib         port:libpcap

# Dependency building command fails but dependecies are built nevertheless
pre-build {
    system "(cd ${worksrcpath} && gnumake depend ) || true"
}

build.type          gnu

set docdir          ${prefix}/share/doc/${name}-${version}

post-destroot {
    xinstall -d ${destroot}${docdir}
    xinstall -W ${worksrcpath} README ${destroot}${docdir}
}

post-install {
    ui_msg "Read ${docdir}/README and edit ${prefix}/etc/kismet.conf"
    ui_msg "In ${prefix}/etc/kismet.conf set source=darwin,en1,airport_extreme"
    ui_msg "and replace your_user_here in suiduser with your username"
}
