Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micro: Update to 2.0.13 #1325

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build_info/micro.control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Architecture: @DEB_ARCH@
Maintainer: @DEB_MAINTAINER@
Section: Text_Editors
Priority: optional
Recommends: pasteboard-utils
Description: modern and intuitive terminal-based text editor
micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities of modern terminals.
As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use.
micro is a terminal-based text editor that aims to be easy to use
and intuitive, while also taking advantage of the full capabilities
of modern terminals. As the name indicates, micro aims to be somewhat
of a successor to the nano editor by being easy to install and use.
11 changes: 11 additions & 0 deletions build_info/micro.control.macosx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Package: micro
Version: @DEB_MICRO_V@
Architecture: @DEB_ARCH@
Maintainer: @DEB_MAINTAINER@
Section: Text_Editors
Priority: optional
Description: modern and intuitive terminal-based text editor
micro is a terminal-based text editor that aims to be easy to use
and intuitive, while also taking advantage of the full capabilities
of modern terminals. As the name indicates, micro aims to be somewhat
of a successor to the nano editor by being easy to install and use.
14 changes: 14 additions & 0 deletions build_patch/micro/better-version-message.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -urN a/cmd/micro/micro.go b/cmd/micro/micro.go
--- a/cmd/micro/micro.go 2023-10-21 18:35:11.000000000 -0400
+++ b/cmd/micro/micro.go 2024-08-12 14:54:10.000000000 -0400
@@ -99,9 +99,7 @@

if *flagVersion {
// If -version was passed
- fmt.Println("Version:", util.Version)
- fmt.Println("Commit hash:", util.CommitHash)
- fmt.Println("Compiled on", util.CompileDate)
+ fmt.Printf("micro %s (%s)\n", util.Version, util.CompileDate)
os.Exit(0)
}

23 changes: 14 additions & 9 deletions makefiles/micro.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,39 @@ $(error Use the main Makefile)
endif

SUBPROJECTS += micro
MICRO_VERSION := 2.0.10
MICRO_VERSION := 2.0.13
DEB_MICRO_V ?= $(MICRO_VERSION)

# NOTE: Generating syntax files for micro on an iOS host doesn't work
# NOTE: Make sure to clear Go's module cache (GOMODCACHE) after
# each build so that syntax highlighting works on supported targets

micro-setup: setup
$(call GITHUB_ARCHIVE,zyedidia,micro,$(MICRO_VERSION),v$(MICRO_VERSION),micro)
$(call GITHUB_ARCHIVE,zyedidia,micro,$(MICRO_VERSION),v$(MICRO_VERSION))
$(call EXTRACT_TAR,micro-$(MICRO_VERSION).tar.gz,micro-$(MICRO_VERSION),micro)
mkdir -p $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin
$(call DO_PATCH,micro,micro,-p1)
mkdir -p $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{share/man/man1,bin}

ifneq ($(wildcard $(BUILD_WORK)/micro/.build_complete),)
micro:
@echo "Using previously built micro."
else
micro: micro-setup
$(MAKE) -C $(BUILD_WORK)/micro build \
$(DEFAULT_GOLANG_FLAGS)
$(INSTALL) -Dm755 $(BUILD_WORK)/micro/micro $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/micro
$(INSTALL) -Dm644 $(BUILD_WORK)/micro/assets/packaging/micro.1 $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man/man1/micro.1
$(INSTALL) -Dm644 $(BUILD_WORK)/micro/assets/packaging/micro.desktop $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/applications/micro.desktop
$(DEFAULT_GOLANG_FLAGS) \
VERSION="$(MICRO_VERSION)" \
DATE="Procursus"
$(INSTALL) -Dm755 $(BUILD_WORK)/micro/micro $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/
$(INSTALL) -Dm644 $(BUILD_WORK)/micro/assets/packaging/micro.1 $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man/man1/
$(call AFTER_BUILD)
endif

micro-package: micro-stage
# micro.mk Package Structure
rm -rf $(BUILD_DIST)/micro
mkdir -p $(BUILD_DIST)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)

# micro.mk Prep micro
cp -a $(BUILD_STAGE)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share} $(BUILD_DIST)/micro/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)
cp -a $(BUILD_STAGE)/micro $(BUILD_DIST)

# micro.mk Sign
$(call SIGN,micro,general.xml)
Expand Down