# $Id: Portfile 89837 2012-02-12 22:43:10Z dports@macports.org $

PortSystem 1.0

name                cpio
version             2.11
revision            2
categories          archivers
platforms           darwin
maintainers         mww
license             GPL-3
description         copies files into or out of a cpio or tar archives
long_description    GNU cpio copies files into or out of a cpio or tar \
                    archive. The archive can be another file on the disk, a \
                    magnetic tape, or a pipe.

homepage            http://www.gnu.org/software/cpio/cpio.html
master_sites        gnu
checksums           md5     20fc912915c629e809f80b96b2e75d7d \
                    sha1    6f1934b0079dc1e85ddff89cabdf01adb3a74abb \
                    rmd160  52507b8ba556dca888ce1179cfda10f9549ea9ab
use_bzip2           yes

depends_lib         port:gettext port:libiconv

patchfiles          patch-src-filetypes.h.diff

configure.args      --program-prefix=gnu \
                    --mandir=${prefix}/share/man \
                    --infodir=${prefix}/share/info \
                    --libexecdir=${prefix}/lib/${name}

test.run            yes
test.target         check

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
    ln -sf ${prefix}/bin/gnucpio ${destroot}${prefix}/libexec/gnubin/cpio
}

livecheck.type      regex
livecheck.url       http://ftp.gnu.org/gnu/cpio/?C=M&O=D
livecheck.regex     cpio-(\[0-9\]+\\.\[0-9\]+)

