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

go.setup            github.com/anacrolix/torrent 1.48.0 v
revision            0

description         Full-featured BitTorrent client package and utilities

long_description    {*}${description}

categories          sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  d49dfa4a1458a05767710da3448d22c13018329c \
                    sha256  5e8cff59e64183af1044aeb025959ad91ccf4eafc738482dbcbd1c39b2f3098c \
                    size    773537

# The build process requires Go modules.  So remove the environment setting
# GO111MODULE=off:
go.offline_build no
build.args          -o ./build ./cmd/...

pre-build {
    file mkdir ${worksrcpath}/build
}

destroot {
    foreach _bin [glob ${worksrcpath}/build/*] {
        copy ${_bin} ${destroot}${prefix}/bin/
    }
}
