%global shortcommit 60846f5 %global compiledate June\ 30,\ 2020 # Generated by go2rpm 1 %bcond_without check %define gobuild(o:) %{expand: # https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 %global _dwz_low_mem_die_limit 0 %ifnarch ppc64 go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**}; %else go build -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**}; %endif } # https://github.com/zyedidia/micro %global goipath github.com/zyedidia/micro Version: 2.0.6 %global goname micro %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).} %global golicenses LICENSE LICENSE-THIRD-PARTY %global godocs README.md Name: %{goname} Release: 1%{?dist} Summary: A modern and intuitive terminal-based text editor # Upstream license specification: MIT and Apache-2.0 License: MIT and ASL 2.0 URL: https://github.com/zyedidia/micro Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Through go mod vendor Source1: vendor-%{version}.tar.gz # 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} %description %{common_description} %prep %autosetup -p1 -n %{name}-%{version} %setup -q -T -D -a1 -n %{name}-%{version} %build export GO111MODULE=on export GOFLAGS=-mod=vendor export LDFLAGS="-X 'github.com/zyedidia/micro/internal/util.Version=%{version}' \ -X 'github.com/zyedidia/micro/internal/util.CommitHash=%{shortcommit}' \ -X 'github.com/zyedidia/micro/internal/util.CompileDate=%{compiledate}' \ -X 'github.com/zyedidia/micro/internal/util.Debug=OFF'" for cmd in cmd/* ; do %gobuild -o _bin/$(basename $cmd) ./$cmd done %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp _bin/* %{buildroot}%{_bindir}/ %files %license LICENSE LICENSE-THIRD-PARTY %doc README.md %{_bindir}/* %changelog * Tue Jun 30 19:33:22 CEST 2020 Robert-André Mauchin - 2.0.6-1 - Update to 2.0.6 (#1849132) * Thu Jun 18 22:07:14 CEST 2020 Robert-André Mauchin - 2.0.4-1 - Update to 2.0.4 * Mon Mar 02 21:53:22 CET 2020 Robert-André Mauchin - 2.0.2-1 - Update to 2.0.2 * Fri Feb 21 00:26:59 CET 2020 Robert-André Mauchin - 2.0.1-9.1 - EPEL 8 version * Thu Feb 20 23:45:56 CET 2020 Robert-André Mauchin - 2.0.1-9 - Add util.Debug=OFF to LDFLAGS to disable debug functions * Mon Feb 17 01:38:14 CET 2020 Robert-André Mauchin - 2.0.1-8 - Update to 2.0.1 * Wed Jan 29 2020 Fedora Release Engineering - 1.4.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 1.4.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jul 23 23:24:56 CEST 2019 Robert-André Mauchin - 1.4.1-6 - Update to new macros * Wed Feb 20 2019 Robert-André Mauchin - 1.4.1-5 - Fix sergi/go-diff BR * Fri Feb 01 2019 Fedora Release Engineering - 1.4.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Aug 10 2018 Robert-André Mauchin - 1.4.1-1 - Upstream release 1.4.1 * Fri Jul 13 2018 Fedora Release Engineering - 1.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Apr 06 2018 Robert-André Mauchin - 1.4.0-2 - Add missing versioning data to build stage - Update to new Go packaging guidelines * Fri Jan 26 2018 Robert-André Mauchin - 1.4.0-1 - Upstream release 1.4.0 * Thu Dec 07 2017 Robert-André Mauchin - 1.3.4-1 - Upstream release 1.3.4 * Fri Sep 29 2017 Robert-André Mauchin - 1.3.3-1 - Initial RPM release