Blob Blame History Raw
# Run tests in check section
%bcond_with check

%global oldgoipath      git.apache.org/thrift.git
%global oldgoname       %gorpmname %{oldgoipath}
%global goipath         github.com/apache/thrift
%global forgeurl        https://github.com/apache/thrift
Version:                0.12.0

%global common_description %{expand:
Thrift is a lightweight, language-independent software stack with an 
associated code generation mechanism for RPC. Thrift provides clean 
abstractions for data transport, data serialization, and application level 
processing. The code generation system takes a simple definition language as 
its input and generates code across programming languages that uses the 
abstracted stack to build interoperable RPC clients and servers.}

%gometa

Name:           %{oldgoname}
Release:        2%{?dist}
Summary:        Thrift Go Software Library
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires: golang(github.com/golang/mock/gomock)

%description
%{common_description}


%package -n %{oldgoname}-devel
Summary:       %{summary}
BuildArch:     noarch

%description -n %{oldgoname}-devel
%{common_description}

This package contains library source intended for
building other packages which use import path with
%{oldgoipath} prefix.


%package -n %{goname}-devel
Summary:    %{summary}
BuildArch:  noarch
 
%description -n %{goname}-devel
%{common_description}
 
This package contains compatibility glue for code that still imports the
%{goipath} Go namespace.


%prep
%forgeautosetup
# Remove files unrelated to the Go Library
find ./* -maxdepth 0 -type d -not -name "lib" -exec rm -rf "{}" \;
find ./* -mindepth 1 -maxdepth 1 -type d -not -name "go" -exec rm -rf "{}" \;
rm -rf lib/go/test


%install
%goinstall

install -m 0755 -vd %{buildroot}%{gopath}/src/%(dirname %{oldgoipath})
ln -s %{gopath}/src/%{goipath} %{buildroot}%{gopath}/src/%{oldgoipath}


%if %{with check}
%check
%gochecks
%endif


%files -n %{oldgoname}-devel
%dir %{gopath}/src/%(dirname %{oldgoipath})
%{gopath}/src/%{oldgoipath}


%files -n %{goname}-devel -f devel.file-list
%license LICENSE
%doc README.md LANGUAGES.md CONTRIBUTING.md


%changelog
* Sun Mar 17 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.12.0-2
- Add github.com/apache/thrift as alternate import path

* Sat Mar 09 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.12.0-1
- Release 0.12.0

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-0.4.git129f332
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-0.3.git129f332
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Jun 28 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.11.0-0.2.20180628git129f332
- Bump to commit 129f332d72facda5d06f87e2b4e5e08bea0b6b44

* Thu Mar 22 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.11.0-0.1.20180417git50bfc56
- First package for Fedora