# -*- 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 114607 2013-12-11 19:45:57Z ryandesign@macports.org $

PortSystem          1.0

name                chkrootkit
version             0.49
revision            1
categories          sysutils
platforms           darwin
maintainers         nomaintainer
license             BSD

description         chkrootkit is a tool to locally check for signs of a rootkit

long_description    chkrootkit is a tool to locally check for signs of a rootkit.

homepage            http://www.chkrootkit.org/
master_sites        ftp://ftp.pangeia.com.br/pub/seg/pac/

checksums           md5     304d840d52840689e0ab0af56d6d3a18 \
                    sha1    cec1a3c482b95b20d3a946b07fffb23290abc4a6 \
                    rmd160  8c23ed9859a7dcf7d43ac15049b48c863ab63e92

patchfiles          patch-chkrootkit.diff

use_configure       no

variant universal {}

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

destroot {
    xinstall -m 755 -W ${worksrcpath} \
        check_wtmpx \
        chkdirs \
        chklastlog \
        chkproc \
        chkrootkit \
        chkutmp \
        chkwtmp \
        ifpromisc \
        strings-static \
        ${destroot}${prefix}/bin

    set docdir ${destroot}${prefix}/share/doc/chkrootkit
    xinstall -m 755 -d ${docdir}

    xinstall -m 644 -W ${worksrcpath} \
        ACKNOWLEDGMENTS \
        COPYRIGHT \
        README \
        README.chklastlog \
        README.chkwtmp \
        ${docdir}
}

platform darwin {
    build.args-append STATIC=
}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)\\.tar
