# micro - Small terminal-based editor
# Generated from manifest.tsv by gen-ports.py. Edit the manifest, not this file,
# unless the package needs something the template cannot express - in which case
# drop a `recipe.local` beside it and it will be preserved.
name=micro
version=2.0.14
release=1
desc="Small terminal-based editor"
url="https://micro-editor.github.io/"
license="MIT"
depend="glibc"
makedepend="go"
source="https://github.com/zyedidia/micro/archive/refs/tags/v2.0.14.tar.gz"
sha256="SKIP"

build() {
	cd "micro-2.0.14"
	export CGO_CPPFLAGS="$CPPFLAGS" CGO_CFLAGS="$CFLAGS" CGO_LDFLAGS="$LDFLAGS"
	export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
	go build -o "micro" .
}

package() {
	cd "micro-2.0.14"
	install -Dm755 "micro" "$pkgdir/usr/bin/micro"
}
