# -*- 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.15 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  a615d1031219e92343d913b9da75101705660446 \
                    sha256  612c775321c268c8f9e1767505ff378bca9b9ab66f5c41b69ecb2464ecf15084 \
                    size    590215

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.]+)}
