# -*- 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/zk-org/zk 0.15.5 v
revision            0

categories          office
license             GPL-3
maintainers         {judaew @judaew} openmaintainer

homepage            https://zk-org.github.io/zk/
description         A plain text note-taking assistant
long_description    zk is a command-line tool helping you to maintain a plain \
                    text Zettelkasten or personal wiki.

checksums           ${distname}${extract.suffix} \
                        rmd160  86a2c44a161ad3e77d3b8f8a8b278c74e1f41053 \
                        sha256  a3260eb1c6309a70a27d0e81c32fce58a9856905e781ea4138aa87d523e910aa \
                        size    668908

# Suppress build date for reproducible builds
# Switch to SOURCE_DATE_EPOCH approach in the future
# See https://trac.macports.org/ticket/59672
set build_date      SUPPRESSED

# FIXME: This port currently can't be built without allowing go mod to fetch
go.offline_build no

build.cmd           make
build.pre_args      VERSION=${version} BUILD=${build_date}
build.args          build

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}
