# -*- 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
PortGroup               makefile 1.0

name                    greed
version                 4.5
revision                0
categories              games
license                 BSD
maintainers             nomaintainer

description             The strategy game of Greed
long_description        {*}${description}. Try to eat as much as possible of \
                        the board before munching yourself into a corner.

homepage                http://www.catb.org/~esr/greed/
master_sites            ${homepage}

checksums               rmd160  c0545414ce12d4627b2ace804a815af8072528a6 \
                        sha256  17e57e27423a9b3380aeea4e780e4247d9a10c60351c7a8c710744dcf9133ea6 \
                        size    16185

depends_build-append    port:asciidoctor

depends_lib-append      port:ncurses

post-build {
    reinplace "s|/usr/lib/games|${prefix}/share/${name}|g" ${worksrcpath}/${name}.6
}

post-destroot {
    file mkdir ${destroot}${prefix}/share/${name}
    system "touch ${destroot}${prefix}/share/${name}/${name}.hs"
    system "chmod 644 ${destroot}${prefix}/share/${name}/${name}.hs"
}
