# -*- 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             20230906
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 727027aa507fe9b4e5c03e4b7665ca22736f8fc4 \
                    sha256 ed9c1fa927fcd878cce955fb0bdc586876ee1ae234666be75c3bbd6e5b2a094b

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}
