# -*- 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                wtf
version             20230126
categories          games
license             public-domain
maintainers         nomaintainer
platforms           any
description         translates common Internet acronyms
long_description    {*}${description}

supported_archs     noarch

homepage            http://cvsweb.netbsd.org/bsdweb.cgi/src/games/wtf/
master_sites        sourceforge:project/bsdwtf

checksums           rmd160  4f0e3b1dba000ae7b2e19ee42bdfddc8a322349b \
                    sha256  456b905d191b7c733569873579909902fcc2273c286d5ffe8e316dc2d11621e9 \
                    size    31095

use_configure       no

patch {
    reinplace "s|/usr|${prefix}|g" ${worksrcpath}/wtf ${worksrcpath}/wtf.6
}

build {}

destroot {
    xinstall ${worksrcpath}/wtf ${destroot}${prefix}/bin
    xinstall -m 0444 ${worksrcpath}/wtf.6 ${destroot}${prefix}/share/man/man6

    xinstall -d ${destroot}${prefix}/share/misc
    xinstall -m 0444 -W ${worksrcpath} acronyms acronyms.comp ${destroot}${prefix}/share/misc
    xinstall -m 0444 -W ${worksrcpath} acronyms-o.real ${destroot}${prefix}/share/misc/acronyms-o
}

livecheck.regex ${name}-(\\d{8})${extract.suffix}
