Blob Blame History Raw
%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:        1%{?dist}
Summary:        Interactive Go interpreter and debugger
License:        MPLv2.0
URL:            %{gourl}
Source0:        %{gosource}

%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


%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
* Sat Jun 09 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.7-1
- First package for Fedora