Blob Blame History Raw
%global debug_package   %{nil}
%global provider        bitbucket
%global provider_tld    org
%global project         ww
%global repo            goautoneg
# https://bitbucket.org/ww/goautoneg
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit          75cd24fc2f2c2a2088577d12123ddee5f54e0675
%global shortcommit     %(c=%{commit}; echo ${c:0:12})

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.1.git%{shortcommit}%{?dist}
Summary:        HTTP Content-Type Autonegotiation
License:        BSD
URL:            https://%{import_path}
Source0:        https://%{import_path}/get/%{shortcommit}.zip
Patch0:         move-license-to-LICENSE.patch
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
BuildArch:      noarch
%else
ExclusiveArch:  %{ix86} x86_64 %{arm}
%endif

%description
%{summary}

%package devel
BuildRequires:  golang >= 1.2.1-3
Requires:       golang >= 1.2.1-3
Summary:        %{summary}

%description devel
%{summary}

This package contains library source intended for 
building other packages which use %{project}/%{repo}.

%prep
%setup -q -n %{project}-%{repo}-%{shortcommit}
%patch0 -p1

%build

%install
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}/

%check
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}

%files devel
%doc README.txt LICENSE
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%{gopath}/src/%{import_path}

%changelog
* Wed Mar 04 2015 jchaloup <jchaloup@redhat.com> - 0-0.1.git75cd24fc2f2c
- First package for Fedora
  resolves: #1198803