# -*- 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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           python 1.0

github.setup        volatilityfoundation volatility 2.6.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          security
maintainers         nomaintainer
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            http://www.volatilityfoundation.org/

checksums           rmd160  c34a84610678174a18636dc2d2d170a8618f6688 \
                    sha256  5f12ef2d73357ee90aecb013b23cecb0fe2d7e246b7f9d5161e6610e51f80051 \
                    size    5247066

supported_archs     noarch
platforms           {darwin any}

python.default_version  27

depends_build-append    port:py${python.version}-setuptools
depends_lib-append      port:py${python.version}-pycryptodome \
                        port:py${python.version}-distorm
depends_run-append      port:yara

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 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS.txt \
        CHANGELOG.txt \
        CREDITS.txt \
        LEGAL.txt \
        LICENSE.txt \
        README.txt \
        ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destroot}${prefix}/share/examples/${name}
}