Files
micro-editor/micro-editor.spec
Jeff Kowalczyk 804f0a94aa Accepting request 1163346 from home:amanzini:branches:devel:languages:go
- Update to version 2.0.13:
  * Add reload setting - finalization of #2627 (#2845)
  * Handle SIGABRT properly
  * Fix python decorator syntax. (#2827)
  * Fixed newline format detection for files not ending with a newline (#2875)
  * Fix typos in README (#2919)
  * fix: recognize .cmd as batch files (#2922)
  * help: fix incorrect instructions for disabling key binding (#2943)
  * Fix non-working lua Lock (#2945)
  * save: Restore the screen before overwriteFile() is left (#2967)
  * save: Restore the screen if failed to start sudo (#2971)
  * syntax: Fix include of patch in git-commit (#2917)
  * Improve metainfo file (#2910)
  * Fix issues with handling invalid regex in syntax files (#2913)
  * Fix term output capturing
  * Docs for fakecursor option
- small .spec cleanup
- run unit tests during build phase

OBS-URL: https://build.opensuse.org/request/show/1163346
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/micro-editor?expand=0&rev=15
2024-03-28 19:51:15 +00:00

79 lines
2.4 KiB
RPMSpec

#
# spec file for package micro-editor
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global shortcommit 225927b
%global compiledate Aug\ 01,\ 2022
Name: micro-editor
Version: 2.0.13
Release: 0
License: MIT
Summary: Micro is a terminal-based text editor that aims to be easy to use and intuitive
URL: https://github.com/zyedidia/micro
Group: Productivity/Text/Editors
Source0: micro-%{version}.tar.gz
Source1: vendor.tar.gz
Patch0: micro-editor-Makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.15
%description
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.
It comes as one single, batteries-included, static binary with no dependencies,
and you can download and use it right now.
As the name indicates, micro aims to be somewhat of a successor to the nano editor
by being easy to install and use in a pinch, but micro also aims to be enjoyable to
use full time, whether you work in the terminal because you prefer it (like me),
or because you need to (over ssh).
%prep
%setup -q -n micro-%{version}
%setup -q -T -D -a 1 -n micro-%{version}
%patch -P 0 -p1
%build
export EXTRAFLAGS="-mod=vendor"
%ifnarch ppc64 ppc64le
export EXTRAFLAGS="${EXTRAFLAGS} -buildmode=pie"
%endif
export DATE="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%s)} --iso-8601)"
export HASH="%{shortcommit}"
export VERSION="%{version}"
%make_build generate
%make_build build-quick
%install
export GOPATH="%{_builddir}/go:$GOPATH"
mkdir -p %{buildroot}%{_bindir}
mv micro %{buildroot}%{_bindir}
%check
go test ./...
%files
%{_bindir}/micro
%changelog