# -*- 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.14 v
go.offline_build    no
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  4fdb8432926abc81484f154df105c4aca3f4ad18 \
                    sha256  40177579beb3846461036387b649c629395584a4bbe970f61ba7591bd9c0185a \
                    size    576800

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/
}

github.livecheck.regex \
                    {([0-9.]+)}
