# -*- 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/zyedidia/micro 2.0.13 v
github.tarball_from archive
revision            0

homepage            https://micro-editor.github.io

description         A modern and intuitive terminal-based text editor

long_description    \
    micro is a terminal-based text editor that aims to be easy to use and \
    intuitive, while also taking advantage of the capabilities of modern \
    terminals. As its name indicates, micro aims to be somewhat of a \
    successor to the nano editor by being easy to install and use. Micro \
    supports a full-blown plugin system. Plugins are written in Lua and there \
    is a plugin manager to automatically download and install your plugins \
    for you.

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

checksums           rmd160  b331159c040b132959b927375146c12b8c93a66c \
                    sha256  a96fff974ed6bd9a1dd58a33e54ff23b78783bbb3571b86d5c37d787b1e0e4be \
                    size    563438

# Allow Go to fetch dependencies at build time
go.offline_build no

build.cmd           make
build.target        build
build.args          HASH=unknown VERSION=${version}

post-extract {
    reinplace {s|^HASH =|HASH ?=|}          ${worksrcpath}/Makefile
    reinplace {s|^VERSION =|VERSION ?=|}    ${worksrcpath}/Makefile
}

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