# -*- 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
maintainers     nomaintainer
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.

homepage            https://www.am-utils.org
master_sites        https://download.filesystems.org/${name}

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

# fsinfo.c:54:22: error: fsi_gram.h: No such file or directory
use_parallel_build  no

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   ${homepage}
livecheck.regex /[quotemeta ${name}]-(\\d(\\.\\d)+)[quotemeta ${extract.suffix}]
