micro: add new package
authorGregory Gullin <[email protected]>
Sat, 12 Jul 2025 13:42:06 +0000 (16:42 +0300)
committerGeorge Sapkin <[email protected]>
Sun, 31 Aug 2025 11:14:23 +0000 (14:14 +0300)
Modern and intuitive terminal-based text editor

https://micro-editor.github.io

Co-authored-by: Wesley Gimenes <[email protected]>
Signed-off-by: Gregory Gullin <[email protected]>
utils/micro/Makefile [new file with mode: 0644]
utils/micro/test.sh [new file with mode: 0644]

diff --git a/utils/micro/Makefile b/utils/micro/Makefile
new file mode 100644 (file)
index 0000000..7bfebea
--- /dev/null
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=micro
+PKG_VERSION:=2.0.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zyedidia/micro/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=40177579beb3846461036387b649c629395584a4bbe970f61ba7591bd9c0185a
+
+PKG_MAINTAINER:=Gregory Gullin <[email protected]>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE LICENSE-THIRD-PARTY
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_FLAGS:=no-mips16
+
+GO_PKG:=github.com/zyedidia/micro/v2
+GO_PKG_LDFLAGS_X:=$(GO_PKG)/internal/util.Version=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/micro
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Editors
+  TITLE:=Modern and intuitive terminal-based text editor
+  URL:=https://micro-editor.github.io/
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/micro/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.
+  It comes as a single, batteries-included, static binary with no dependencies;
+  you can download and use it right now!
+endef
+
+define Package/micro/conffiles
+/root/.config/micro/
+endef
+
+$(eval $(call GoBinPackage,micro))
+$(eval $(call BuildPackage,micro))
diff --git a/utils/micro/test.sh b/utils/micro/test.sh
new file mode 100644 (file)
index 0000000..c7c7fc8
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+micro -version | grep -F "${PKG_VERSION}"