# $Id$
PortSystem          1.0

name                macathena-moira
version             20190912
distname            moira-${version}
categories          net
maintainers         mit.edu:sipb-macathena
description         Moira is the Project Athena service management system
platforms           darwin
homepage            https://github.mit.edu/ops/moira
master_sites        http://macathena.mit.edu/dist/
patchfiles          patch-lib-mr_init.c

worksrcdir          moira-b5abed703a6775e8c7ca795c29b58fd211b34780/moira

checksums           md5     3e301d66296002aa79a151afeb85b6d5 \
                    sha1    d770c1eab15c74cac57e622431b4519daf297c67 \
                    rmd160  077257328de1475545ab327315e3258fd093abe3 \
                    sha256  1235824b7dcd1e4e067f841a2366dfd80555f7459a89d5202d927f72a0b57839 \
                    size    1881295

use_autoconf	yes

configure.args	--with-krb5 \
				--with-com_err=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr \
				--with-hesiod


configure.env-append	TERM=vt100

post-destroot	{
	file rename ${destroot}${prefix}/bin/chfn \
		${destroot}${prefix}/bin/chfn.moira
	file rename ${destroot}${prefix}/bin/chsh \
		${destroot}${prefix}/bin/chsh.moira
	file rename ${destroot}${prefix}/share/man/man1/chfn.1 \
		${destroot}${prefix}/share/man/man1/chfn.moira.1
	file rename ${destroot}${prefix}/share/man/man1/chsh.1 \
		${destroot}${prefix}/share/man/man1/chsh.moira.1
}

depends_build		port:e2fsprogs

depends_lib		port:libhesiod \
				port:ncurses

destroot.violate_mtree	yes
