# $Id: Portfile,v 1.2 2005/12/09 16:23:49 olegb Exp $
PortSystem              1.0
PortGroup               python24 1.0

name                    scapy
version                 1.0.2.9
revision                1
categories              net security python
maintainers             chris.owen@consault.com
description             A powerful packet manipulation tool
long_description	\
        Scapy is a powerful interactive packet manipulation program. It is \
        able to forge or decode packets of a wide number of protocols, send \
        them on the wire, capture them, match requests and replies, and much \
        more. It can easily handle most classical tasks like scanning, \
        tracerouting, probing, unit tests, attacks or network discovery (it \
        can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, \
        tethereal, p0f, etc.). It also performs very well at a lot of other \
        specific tasks that most other tools can't handle, like sending \
        invalid frames, injecting your own 802.11 frames, combining technics \
        (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted \
        channel, ...), etc.

homepage                http://www.secdev.org/projects/scapy
master_sites            http://www.secdev.org/projects/scapy/all \
                        http://www.secdev.org/projects/scapy/files
distfiles		${distname}.py ethertypes

patchfiles              patch-scapy.py.diff

extract.only

depends_lib-append      port:py-readline port:py-pylibpcap port:py-libdnet \
                        port:py-crypto port:py-gnuplot port:py-pyx port:graphviz
                        
checksums               \
        ${distname}.py  md5    16e92a47bf2e53d463025e1ea19a1e53 \
                        sha1   f82b23ffe615a730a0eb21a7370a8c04053ea65c \
                        rmd160 568ade74483214451393f23cc204621d2eb717f6 \
        ethertypes      md5    94bffde8f75a1b8f891fb780bfe15ca2 \
                        sha1   6ed0fe2446666876d77b8971fd8edf495a9c0be3 \
                        rmd160 296b88fed911b25398b5f657cd6bb5c91e72e288

pre-patch {
        xinstall -m 775 -d ${worksrcpath}
        file copy ${distpath}/${distname}.py ${worksrcpath}/${name}.py
}
configure {}
build     {}
destroot  {
        xinstall -m 644 -W ${distpath} ethertypes \
                ${destroot}${prefix}/etc
        xinstall -m 755 -W ${worksrcpath} scapy.py \
                ${destroot}${prefix}/bin
}
