The package rpms/micro.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/micro.git/commit/?id=42210e59c469....
Change:
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
Thanks.
Full change:
============
commit 42210e59c4692e3ba3094ddc6263f34232576a2a
Author: Robert-André Mauchin <zebob.m(a)gmail.com>
Date: Fri Apr 6 14:34:59 2018 +0200
Add missing versioning data to build stage
Update to new Go packaging guidelines
diff --git a/micro.spec b/micro.spec
index d6e8904..0230ac1 100644
--- a/micro.spec
+++ b/micro.spec
@@ -1,24 +1,28 @@
-# Build with debug info rpm
-%global with_debug 1
+%global shortcommit af520cf
+%global compiledate April\ 06,\ 2018
-%if 0%{?with_debug}
-%global _dwz_low_mem_die_limit 0
-%else
-%global debug_package %{nil}
-%endif
+%global goipath
github.com/zyedidia/micro
+Version: 1.4.0
+
+%global common_description %{expand:
+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).}
+
+%gometa
Name: micro
-Version: 1.4.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A modern and intuitive terminal-based text editor
License: MIT
URL:
https://micro-editor.github.io/
-Source0:
https://github.com/zyedidia/micro/archive/v%{version}/%{name}-%{version}....
-
-# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
-# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
-BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
+Source0: %{gosource}
BuildRequires: golang(gopkg.in/yaml.v2)
BuildRequires:
golang(github.com/blang/semver)
@@ -40,35 +44,26 @@ BuildRequires:
golang(github.com/zyedidia/tcell)
BuildRequires:
golang(github.com/zyedidia/terminal)
BuildRequires:
golang(layeh.com/gopher-luar)
-
%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).
+%{common_description}
%prep
-%autosetup -p1 -n %{name}-%{version}
+%forgeautosetup
rm -rf micro/cmd/micro/vendor/
-%build
-mkdir -p ./_build/src/github.com/zyedidia/
-ln -s $(pwd) ./_build/src/github.com/zyedidia/micro
-export GOPATH=$(pwd)/_build:%{gopath}
-
-%gobuild -o micro ./cmd/micro
+%build
+%gobuildroot
+export LDFLAGS="-X main.Version=%{version} \
+ -X main.CommitHash=%{shortcommit} \
+ -X 'main.CompileDate=%{compiledate}'"
+%gobuild -o _bin/micro %{goipath}/cmd/micro
%install
-install -p -D -m 0755 ./micro %{buildroot}%{_bindir}/micro
+install -Dpm 0755 _bin/micro %{buildroot}%{_bindir}/micro
%files
@@ -78,6 +73,10 @@ install -p -D -m 0755 ./micro %{buildroot}%{_bindir}/micro
%changelog
+* Fri Apr 06 2018 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.4.0-2
+- Add missing versioning data to build stage
+- Update to new Go packaging guidelines
+
* Fri Jan 26 2018 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.4.0-1
- Upstream release 1.4.0