Blob Blame Raw
# Generated by go2rpm
%bcond_without check
%bcond_without bootstrap

# https://github.com/jacobsa/oglemock
%global goipath         github.com/jacobsa/oglemock
%global commit          e94d794d06ffc6de42cb19d0dab3c219efdd6dcf

%gometa

%global common_description %{expand:
Oglemock is a mocking framework for the Go programming language with the
following features:

 - An extensive and extensible set of matchers for expressing call expectations
   (provided by the oglematchers package).
 - Clean, readable output that tells you exactly what you need to know.
 - Style and semantics similar to Google Mock and Google JS Test.
 - Seamless integration with the ogletest unit testing framework.

It can be integrated into any testing framework (including Go's testing
package), but out of the box support is built in to ogletest and that is the
easiest place to use it.}

%global golicenses      LICENSE
%global godocs          README.md

Name:           %{goname}
Version:        0
Release:        0.2%{?dist}
Summary:        Mocking framework for Go inspired by Google's Mock for C++ and JS Test

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}
# Patch test output to recognize we use the system installed context package as it is now part of golang (>1.7)
Patch0:         gcs_test.patch
# Turn off the unknownInterface test
Patch1:         unknownInterface.patch

BuildRequires:  golang(github.com/jacobsa/oglematchers)

%if %{without bootstrap}
%if %{with check}
# Tests
BuildRequires:  golang(github.com/jacobsa/ogletest)
%endif
%endif

%description
%{common_description}

%gopkg

%prep
%goprep
%patch0 -p0
%patch1 -p0

%build
for cmd in createmock; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

%install
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{without bootstrap}
%if %{with check}
%check
%gocheck
%endif
%endif

%files
%license LICENSE
%doc README.md
%{_bindir}/*

%gopkgfiles

%changelog
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Jun 22 22:56:40 CEST 2019 Brian (bex) Exelbierd <bexelbie@redhat.com> - 0-0.1.20190622gite94d794
- Initial package