# $Id$

PortSystem 1.0

name            foremost
version         1.5.7
revision        1
categories      sysutils
maintainers     hudora.de:md
platforms       darwin
description     a console program to recover files based on their headers and footers.
long_description Foremost is a console program to recover files based on \
their headers and footers. Foremost can work on image files, such as those \
generated by dd, Safeback, Encase, etc, or directly on a drive. The headers \
and footers are specified by a configuration file, so you can pick and \
choose which headers you want to look for.
homepage        http://foremost.sourceforge.net/
master_sites    ${homepage}pkg/
checksums       sha256  502054ef212e3d90b292e99c7f7ac91f89f024720cd5a7e7680c3d1901ef5f34 \
                rmd160  437e174cccc25c4ae672825a413c865555bb4a46

use_configure   no

pre-build {
    reinplace "s#RAW_CC = gcc#RAW_CC = ${configure.cc}#" ${worksrcpath}/Makefile
}

platform darwin {
        build.target     mac
        build.env-append RAW_CC=${configure.cc}
        destroot.args    BIN=${destroot}${prefix}/bin \
                         MAN=${destroot}${prefix}/share/man/man8 \
                         CONF=${destroot}${prefix}/etc
}

post-destroot   {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
        xinstall -m 644 -W ${worksrcpath} README CHANGES \
                ${destroot}${prefix}/share/doc/${name}
        move ${destroot}${prefix}/etc/foremost.conf \
             ${destroot}${prefix}/etc/foremost.conf.sample
}