# $Id: Portfile 64677 2010-03-13 23:36:13Z mww@macports.org $

PortSystem 1.0

name                gnutar
version             1.23
categories          archivers
maintainers         mww
license             GPLv3
description         tar version of the GNU project
long_description \
    the gnutar program creates, adds files to, or extracts files from   \
    an archive file in gnutar format, called a tarfile. A tarfile is    \
    often a magnetic tape, but can be a floppy diskette or any regular  \
    disk file.

homepage            http://www.gnu.org/software/tar/
master_sites        gnu:tar
checksums           md5     41e2ca4b924ec7860e51b43ad06cdb7e \
                    sha1    6f3b1443a019da02e4ec20a1446d4aa54b488071 \
                    rmd160  e79062b7f69d80b734445306f69fb8b96801e909
distname            tar-${version}
use_bzip2           yes
platforms           darwin

depends_lib         port:gettext port:libiconv

configure.args      --program-prefix=gnu \
                    --infodir=${prefix}/share/info

test.run            yes
test.target         check

post-destroot {
    xinstall -v -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -v -W ${worksrcpath} ABOUT-NLS AUTHORS COPYING ChangeLog \
        ChangeLog.1 INSTALL NEWS README THANKS TODO \
        ${destroot}${prefix}/share/doc/${name}
    file rename ${destroot}${prefix}/share/info/tar.info ${destroot}${prefix}/share/info/gnutar.info
    file rename ${destroot}${prefix}/share/info/tar.info-1 ${destroot}${prefix}/share/info/gnutar.info-1
    file rename ${destroot}${prefix}/share/info/tar.info-2 ${destroot}${prefix}/share/info/gnutar.info-2

    xinstall -m 755 -d ${destroot}/${prefix}/libexec/gnubin
    ln -sf ${prefix}/bin/gnutar ${destroot}${prefix}/libexec/gnubin/tar
}

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

