%define commit 3a7403b %define date 20260128 %define import_path github.com/micro-editor/micro/v2 Name: micro-git Version: 2.0.15^%{date}g%{commit} Release: 1%{?dist} Summary: A modern and intuitive terminal-based text editor License: MIT AND BSD-3-Clause AND BSD-2-Clause AND Apache-2.0 AND MPL-2.0 URL: https://github.com/micro-editor/micro Source0: %{url}/archive/refs/heads/master.zip ExclusiveArch: %{go_arches} BuildRequires: git-core BuildRequires: make BuildRequires: compiler(go-compiler) BuildRequires: pandoc %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 is a single, batteries-included, static binary. %prep %autosetup -n micro-master %build export LDFLAGS="-X %{import_path}/internal/util.Version=%{version} \ -X %{import_path}/internal/util.CommitHash=%{commit} \ -X %{import_path}/internal/util.CompileDate=%{date}" %gomodules %gobuild -o micro cmd/micro/main.go make -f Makefile man %install install -Dpm 0755 micro %{buildroot}%{_bindir}/micro install -Dpm 0644 assets/packaging/micro.1 %{buildroot}%{_mandir}/man1/micro.1 install -Dpm 0644 assets/packaging/micro.desktop %{buildroot}%{_datadir}/applications/micro.desktop install -Dpm 0644 assets/packaging/micro.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/micro.svg %files %license LICENSE LICENSE-THIRD-PARTY %doc README.md %{_bindir}/%{name} %{_mandir}/man1/micro.1* %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %changelog %autochangelog