Blob Blame History Raw
%global provider        github
%global provider_tld    com
%global project         golang
%global repo            glog
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit 44145f04b68cf362d9c4df2182967c2275eaefed
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.4.git%{shortcommit}%{?dist}
Summary:        Leveled execution logs for Go
License:        ASL 2.0
URL:            http://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
%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:        Enables Go programs to comfortably encode and decode YAML values
Provides:       golang(%{import_path}) = %{version}-%{release}

%description devel
%{summary}

This is an efficient pure Go implementation of leveled logs in the
manner of the open source C++ package
    http://code.google.com/p/google-glog

By binding methods to booleans it is possible to use the log package
without paying the expense of evaluating the arguments to the log.
Through the -vmodule flag, the package also provides fine-grained
control over logging at the file level.

%prep
%setup -n %{repo}-%{commit} -q

%build

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

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

%files devel
%doc LICENSE README
%dir %{gopath}/src/%{import_path}
%{gopath}/src/%{import_path}/*.go

%changelog
* Sun Nov 09 2014 jchaloup <jchaloup@redhat.com> - 0-0.4.git44145f0
- Bump to upstream 44145f04b68cf362d9c4df2182967c2275eaefed
  resolves: #1161627
- Choose the correct architecture

* Tue Oct 14 2014 jchaloup <jchaloup@redhat.com> - 0-0.3.gitd1c4472
- BuildArch to ExclusiveArch

* Mon Sep 15 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.2.gitd1c4472
- BR golang
- include check

* Tue Aug 05 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.0.1.gitd1c4472b
- First package for Fedora