# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 102822 2013-02-09 00:51:24Z jmr@macports.org $

PortSystem          1.0

name                driftnet
version             0.1.6
revision            5
categories          net
platforms           darwin
maintainers         nomaintainer
license             GPL-2+

description         Watch the pictures go by on your net

long_description    Inspired by EtherPEG, Driftnet is a program which \
                    listens to network traffic and picks out images from \
                    TCP streams it observes. Fun to run on a host which \
                    sees lots of web traffic.

homepage            http://www.ex-parrot.com/~chris/driftnet
master_sites        http://www.ex-parrot.com/~chris/driftnet/ \
                    http://www.vanheusden.com/mirrors/

checksums           md5     8e11d77770452f97bb3c23f510489815 \
                    rmd160  01057f3cb992faa537a8b188e116c6f21016cfac \
                    sha256  dbdf7ead3ae14b109f88c86dedeb7524be8c257aa773a781891216f013373d6d

depends_build       port:makedepend

depends_lib         port:jpeg \
                    port:libpcap \
                    port:giflib \
                    port:gtk1

patchfiles          patch-driftnet.h \
                    patch-driftnet.c \
                    patch-img.h \
                    patch-media.c \
                    patch-Makefile

use_configure       no

variant universal {}

build.target

build.args          CC="${configure.cc} [get_canonical_archflags cc]"

destroot {
    xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
    
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} CHANGES COPYING CREDITS README TODO ${destroot}${docdir}
}
