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

name                robots2policy
go.setup            github.com/TecharoHQ/anubis 1.28.2 v
github.tarball_from releases
revision            0

categories          security www
license             MIT
maintainers         @wu21-web openmaintainer
description         Convert robots.txt rules to Anubis policies
long_description    robots2policy converts robots.txt files into Anubis bot \
                    policies in YAML or JSON format. It accepts local files, \
                    URLs, and standard input.
homepage            https://anubis.techaro.lol/

distname            anubis-src-vendor-npm-${version}
checksums           rmd160  ebe5014872052ceca6899074758f57231b3f0a53 \
                    sha256  524faa5da63fe45ccc8f070cd8bb12c2ac98599ed4832a17b42c2d09c19c66c2 \
                    size    26498890

build.env-delete    GO111MODULE=off
build.env-append    GO111MODULE=on \
                    GOTOOLCHAIN=local
build.args          -mod=vendor \
                    -trimpath \
                    -o ${name} \
                    ./cmd/robots2policy

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}/
}
