From eae7cfc4c20e002404cc8752abf4b9ec2f17e5ab Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Jan 20 2017 16:03:05 +0000 Subject: Bump to upstream 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - related: #1250518 --- diff --git a/.gitignore b/.gitignore index 01f45d2..fc9b4e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/42ca6cd68aa922bc3f32f1e056e61b65945d9ad7.tar.gz +/inf-3887ee9.tar.gz diff --git a/golang-googlecode-go-decimal-inf.spec b/golang-googlecode-go-decimal-inf.spec index 92ac9c9..df0bef6 100644 --- a/golang-googlecode-go-decimal-inf.spec +++ b/golang-googlecode-go-decimal-inf.spec @@ -1,16 +1,27 @@ -%if 0%{?fedora} || 0%{?rhel} == 6 +# If any of the following macros should be set otherwise, +# you can wrap any of them with the following conditions: +# - %%if 0%%{centos} == 7 +# - %%if 0%%{?rhel} == 7 +# - %%if 0%%{?fedora} == 23 +# Or just test for particular distribution: +# - %%if 0%%{centos} +# - %%if 0%%{?rhel} +# - %%if 0%%{?fedora} +# +# Be aware, on centos, both %%rhel and %%centos are set. If you want to test +# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. +# (Don't forget to replace double percentage symbol with single one in order to apply a condition) + +# Generate devel rpm %global with_devel 1 +# Build project from bundled dependencies %global with_bundled 0 +# Build with debug info rpm %global with_debug 0 +# Run tests in check section %global with_check 1 +# Generate unit-test rpm %global with_unit_test 1 -%else -%global with_devel 0 -%global with_bundled 0 -%global with_debug 0 -%global with_check 0 -%global with_unit_test 0 -%endif %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 @@ -18,43 +29,29 @@ %global debug_package %{nil} %endif -%define copying() \ -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 \ -%license %{*} \ -%else \ -%doc %{*} \ -%endif - -%global provider google -%global provider_sub code +%global provider github %global provider_tld com -%global project p -%global repo go-decimal-inf -%global provider_prefix code.google.com/p/go-decimal-inf +%global project go-inf +%global repo inf +# https://github.com/go-inf/inf +%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path speter.net/go/exp/math/dec/inf -%global rev 42ca6cd68aa922bc3f32f1e056e61b65945d9ad7 -%global shortrev %(r=%{rev}; echo ${r:0:12}) +%global sec_import_path gopkg.in/inf.v0 +%global commit 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) -Name: golang-%{provider}%{provider_sub}-%{repo} -Version: 0 -Release: 0.8.hg%{shortrev}%{?dist} +Name: golang-google-code-go-decimal-inf +Version: 0.9.0 +Release: 0.1.git%{shortcommit}%{?dist} Summary: Package implementing "infinite-precision" decimal arithmetic License: BSD -URL: https://%{import_path} -Source0: https://exp.go-decimal-inf.%{provider}%{provider_sub}.%{provider_tld}/archive/%{rev}.tar.gz +URL: https://%{provider_prefix} +Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -# If go_arches not defined fall through to implicit golang archs -%if 0%{?go_arches:1} -ExclusiveArch: %{go_arches} -%else -ExclusiveArch: %{ix86} x86_64 %{arm} -%endif -# If gccgo_arches does not fit or is not defined fall through to golang -%ifarch 0%{?gccgo_arches} -BuildRequires: gcc-go >= %{gccgo_min_vers} -%else -BuildRequires: golang -%endif +# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required +ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} +# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} %description Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic. @@ -74,7 +71,8 @@ BuildArch: noarch %if 0%{?with_check} %endif -Provides: golang(speter.net/go/exp/math/dec/inf) = %{version}-%{release} +Provides: golang(%{import_path}) = %{version}-%{release} +Provides: golang(%{sec_import_path}) = %{version}-%{release} %description devel Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic. @@ -93,18 +91,6 @@ building other packages which use speter.net/go/exp/math/dec/inf. %if 0%{?with_unit_test} %package unit-test Summary: Unit tests for %{name} package -# If go_arches not defined fall through to implicit golang archs -%if 0%{?go_arches:1} -ExclusiveArch: %{go_arches} -%else -ExclusiveArch: %{ix86} x86_64 %{arm} -%endif -# If gccgo_arches does not fit or is not defined fall through to golang -%ifarch 0%{?gccgo_arches} -BuildRequires: gcc-go >= %{gccgo_min_vers} -%else -BuildRequires: golang -%endif %if 0%{?with_check} #Here comes all BuildRequires: PACKAGE the unit tests @@ -122,7 +108,7 @@ providing packages with %{import_path} prefix. %endif %prep -%setup -q -n exp.%{repo}-%{shortrev} +%setup -q -n %{repo}-%{commit} %build @@ -135,6 +121,10 @@ for file in $(find . -iname "*.$ext" \! -iname "*_test.go") ; do install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list + + install -d -p %{buildroot}/%{gopath}/src/%{sec_import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{sec_import_path}/$file + echo "%%{gopath}/src/%%{sec_import_path}/$file" >> devel.file-list done %endif @@ -143,40 +133,49 @@ done install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ # find all *_test.go files and generate unit-test.file-list for file in $(find . -iname "*_test.go"); do - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list + install -d -p %{buildroot}/%{gopath}/src/%{sec_import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{sec_import_path}/$file + echo "%%{gopath}/src/%%{sec_import_path}/$file" >> unit-test.file-list done %endif +%if 0%{?with_devel} +sort -u -o devel.file-list devel.file-list +%endif + %check %if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -%ifarch 0%{?gccgo_arches} -function gotest { %{gcc_go_test} "$@"; } -%else -%if 0%{?golang_test:1} -function gotest { %{golang_test} "$@"; } +%if ! 0%{?with_bundled} +export GOPATH=%{buildroot}/%{gopath}:%{gopath} %else -function gotest { go test "$@"; } +export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %endif + +%if ! 0%{?gotest:1} +%global gotest go test %endif -export GOPATH=%{buildroot}/%{gopath}:%{gopath} -gotest %{import_path} +%gotest %{sec_import_path} %endif +#define license tag if not already defined +%{!?_licensedir:%global license %doc} + %if 0%{?with_devel} -%files devel -%copying LICENSE -%{gopath}/src/%{import_path}/ +%files devel -f devel.file-list +%license LICENSE %endif %if 0%{?with_unit_test} %files unit-test -f unit-test.file-list -%copying LICENSE +%license LICENSE %endif %changelog +* Fri Jan 20 2017 Jan Chaloupka - 0.9.0-0.1.git3887ee9 +- Bump to upstream 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 + related: #1250518 + * Thu Jul 21 2016 Fedora Release Engineering - 0-0.8.hg42ca6cd68aa9 - https://fedoraproject.org/wiki/Changes/golang1.7 diff --git a/sources b/sources index 8558992..033ffda 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -af834b0f8bab66991890d1a1b8690c07 42ca6cd68aa922bc3f32f1e056e61b65945d9ad7.tar.gz +SHA512 (inf-3887ee9.tar.gz) = 4508783b29a6ac4e0fd42d15df772294506775e590fc0ba74fff3da654d118e50ee47b827cadfbe8b0b001904705d1108ace744b90e47152099ff3b3caa177cb