%undefine _debugsource_packages
%global goipath github.com/cosmos72/gomacro
Version: 2.7
%global common_description %{expand:
gomacro is an almost complete Go interpreter, implemented in pure Go. It offers
both an interactive REPL and a scripting mode, and does not require a Go
toolchain at runtime (except in one very specific case: import of a third party
package at runtime).}
%gometa
Name: %{goname}
Release: 2%{?dist}
Summary: Interactive Go interpreter and debugger
License: MPLv2.0
URL: %{gourl}
Source0: %{gosource}
# https://github.com/cosmos72/gomacro/commit/b1b877762ce43edd5f3cce11f727bca599ab62b9
Patch0001: 0001-fix-34-do-not-assume-that-os.File-6th-method-is-Read.patch
%description
%{common_description}
%package -n gomacro
Summary: %{summary}
%description -n gomacro
%{common_description}
%package -n %{goname}-devel
Summary: %{summary}
BuildRequires: golang(github.com/peterh/liner)
BuildRequires: golang(golang.org/x/sync/syncmap)
%description -n %{goname}-devel
%{common_description}
This package contains library source intended for building other packages
which use import path with %{goipath} prefix.
%prep
%gosetup -q
%patch0001 -p1
%build
%gobuildroot
%gobuild -o _bin/gomacro %{goipath}
%install
%goinstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp _bin/* %{buildroot}%{_bindir}/
%check
%gochecks
%files -n gomacro
%doc README.md
%license LICENSE
%{_bindir}/gomacro
%files -n %{goname}-devel -f devel.file-list
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 09 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.7-1
- First package for Fedora