# $Id: Portfile 87262 2011-11-15 09:49:09Z mww@macports.org $

PortSystem 1.0

name                star
version             1.5.1
categories          archivers
platforms           darwin
maintainers         mww openmaintainer
license             CDDL
description         fast and POSIX 1003.1 conformant tar implementation
long_description    ${description}

homepage            http://cdrecord.berlios.de/old/private/star.html
master_sites        ftp://ftp.berlios.de/pub/star
checksums           sha1 62ba0e0a995fc5deb492b025ecffe58735574b8a \
                    rmd160 5046551136bd990ba646d7de7de30f353ff31c8b \
                    sha256 918cf5d7f2285104990d608dd3e8873a10c60fa56fd21c9b527d6829dea3828e
patchfiles          patch-RULES__rules.prg.diff
use_bzip2           yes

depends_build       port:smake

worksrcdir          star-${version}

use_configure       no

use_parallel_build  no
build.cmd           ${prefix}/bin/smake

destroot.destdir    INS_BASE=${destroot}${prefix} \
                    MANDIR=share/man
post-destroot {
    system "cd ${destroot}${prefix}/bin/ && \
        rm -f gnutar mt tar && \
        mv tartest startest"
    system "cd ${destroot}${prefix}/share/man && \
        rm -rf man1/gnutar.1 man1/match.1 man1/rmt.1 man3 \
        man5/makerules.5 man5/makefiles.5 && \
        mv man1/tartest.1 man1/startest.1"
    file delete -force ${destroot}${prefix}/lib ${destroot}${prefix}/include
}

universal_variant   no

livecheck.type      regex
livecheck.url       ftp://ftp.berlios.de/pub/star/
livecheck.regex     star-(\[0-9\.\]+).tar.gz

