# -*- 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

PortSystem      1.0

name            am-utils
version         6.1.5
revision        1
checksums       rmd160  ab1485aaa65c522cc5db7c7917ec59d3b47e0803 \
                sha256  d070682af75effd6b49ed3e893603039ecd0a013a49d8d09375187676d645178

categories      sysutils
platforms       darwin
maintainers     nomaintainer

homepage        http://www.am-utils.org/
license         BSD
description     The Berkeley Automounter Suite of Utilities
long_description \
    the "next generation" of the popular BSD Automounter, Amd. Am-utils \
    includes many additional updates, ports, programs, features (such as\
    Autofs support, NFS V.3 support, and shared libraries), bug fixes,  \
    and more.

master_sites    ftp://ftp.fu-berlin.de/unix/network/${name} \
                ftp://ftp.cise.ufl.edu/pub/mirrors/${name} \
                ftp://ftp.ring.gr.jp/pub/net/${name} \
                ftp://ftp.u-aizu.ac.jp/pub/net/amd/${name}

configure.args  --infodir=${prefix}/share/info \
                --mandir=${prefix}/share/man

platform darwin {
    if {${os.major} >= 13} {
        patchfiles      patch-amd__amq_subr.c-mavericks-rpc-compatibility.diff \
                        patch-amd__amq_xdr.c-mavericks-rpc-compatibility.diff \
                        patch-libamu__misc_rpc.c-mavericks-rpc-compatibility.diff
    }
}

post-destroot {
    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    xinstall -W ${worksrcpath} -m 0444 \
       COPYING \
       ChangeLog \
       FAQ \
       README \
       README.attrcache \
       README.autofs \
       README.ldap \
       README.osx \
       README.y2k \
       ${destroot}${prefix}/share/doc/${name} 
}

test.run        yes
test.target     check

livecheck.type  regex
livecheck.url   ftp://ftp.fu-berlin.de/unix/network/${name}/
livecheck.regex [quotemeta ${name}]-(\\d(\\.\\d)+)[quotemeta ${extract.suffix}]