# $Id: Portfile 70206 2010-08-01 23:28:25Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                volatility
set my_name         Volatility
version             1.1.2
categories          security
platforms           darwin
maintainers         yahoo.fr:jul_bsd openmaintainer
license             GPL-2+

description         collection of tools for the extraction of digital \
                    artifacts from volatile memory (RAM) samples

long_description    The Volatility Framework is a completely open collection \
                    of tools for the extraction of digital artifacts from \
                    volatile memory (RAM) samples. The extraction techniques \
                    are performed completely independent of the system being \
                    investigated but offer unprecedented visibilty into the \
                    runtime state of the system. The framework is intended \
                    to introduce people to the techniques and complexities \
                    associated with extracting digital artifacts from \
                    volatile memory samples and provide a platform for \
                    further work into this exciting area of research.

homepage            https://www.volatilesystems.com/default/volatility
master_sites        https://www.volatilesystems.com/volatility/${version}/
distname            ${my_name}-${version}

checksums           md5     e8272a7fa2f361880cf79d93b100f64a \
                    sha1    15bac31c4b0026a5422637f439dce499b1e19ac1 \
                    rmd160  89778cc7d6ad58ef12d87c00228efbc894474ad8

supported_archs     noarch

post-patch {
    reinplace "s|import sys|import sys\\\nsys.path.append('${python.pkgd}')|" \
        ${worksrcpath}/volatility
    reinplace "s|^#!c:\\\\python\\\\python.exe|#!${python.bin}|" \
        ${worksrcpath}/volatility
}

post-destroot {
    xinstall -m 755 -W ${worksrcpath} \
        volatility \
        ${destroot}${prefix}/bin
    
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS.txt \
        CREDITS.txt \
        LEGAL.txt \
        LICENSE.txt \
        README.txt \
        ${destroot}${prefix}/share/doc/${name}

    xinstall -m 644 -W ${worksrcpath} \
        vmodules.py \
        vsyms.py \
        vtypes.py \
        vutils.py \
        ${destroot}${python.pkgd}
}

livecheck.type      regex
livecheck.regex     ${my_name}-(\[0-9.\]+)\\.tar
