%global debug_package %{nil}
%global import_path github.com/openshift/go-json-rest
%global gopath %{_datadir}/gocode
%global commit 7715b156a4414c449c49e2a98dda4fb84ea5fc11
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: golang-github-openshift-go-json-rest
Version: 0
Release: 0.3.git%{shortcommit}%{?dist}
Summary: A quick and easy way to setup a RESTful JSON API
License: ASL 2.0
URL: http://%{import_path}
Source0: https://%{import_path}/archive/%{commit}/go-systemd-%{shortcommit}.tar.gz
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
BuildArch: noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm}
%endif
%description
%{summary}
%package devel
Requires: golang
Summary: A quick and easy way to setup a RESTFUL JSON API
Provides: golang(%{import_path}) = %{version}-%{release}
Provides: golang(%{import_path}/test) = %{version}-%{release}
Provides: golang(%{import_path}/trie) = %{version}-%{release}
%description devel
%{summary}
This package contains library source intended for building other packages
which use openshift/go-json-rest.
%prep
%setup -n go-json-rest-%{commit}
%build
%install
for d in . test trie; do
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$d
cp -av $d/*.go %{buildroot}/%{gopath}/src/%{import_path}/$d
done
%check
%files devel
%doc LICENSE README.md
%dir %attr(755,root,root) %{gopath}
%dir %attr(755,root,root) %{gopath}/src
%dir %attr(755,root,root) %{gopath}/src/github.com
%dir %attr(755,root,root) %{gopath}/src/github.com/openshift
%dir %attr(755,root,root) %{gopath}/src/%{import_path}
%dir %attr(755,root,root) %{gopath}/src/%{import_path}/test
%dir %attr(755,root,root) %{gopath}/src/%{import_path}/trie
%{gopath}/src/%{import_path}/*.go
%{gopath}/src/%{import_path}/test/*.go
%{gopath}/src/%{import_path}/trie/*.go
%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.3.git7715b15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.2.git7715b15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Apr 04 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.1.git
- Initial package