From 7430ebb5ba4b5ae6d8ec097a8a36dc4f59bc5dbb Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Aug 09 2016 12:56:05 +0000 Subject: Polish spec file, enable devel and unit-test for epel7 - related: #1214619 --- diff --git a/golang-github-onsi-ginkgo.spec b/golang-github-onsi-ginkgo.spec index 76b0c60..3af7593 100644 --- a/golang-github-onsi-ginkgo.spec +++ b/golang-github-onsi-ginkgo.spec @@ -6,11 +6,11 @@ %global with_check 0 %global with_unit_test 1 %else -%global with_devel 0 +%global with_devel 1 %global with_bundled 0 %global with_debug 0 %global with_check 0 -%global with_unit_test 0 +%global with_unit_test 1 %endif %if 0%{?with_debug} @@ -31,7 +31,7 @@ Name: golang-%{provider}-%{project}-%{repo} Version: 1.1.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A Golang BDD Testing Framework License: MIT URL: https://%{provider_prefix} @@ -39,18 +39,10 @@ Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcomm # Upstream fix for aarch64 a0fde42 Patch1: 0001-Add-linux_arm64-support.patch -# 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 %{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 %{summary} @@ -143,36 +135,38 @@ done %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}/ginkgo/nodot -gotest %{import_path}/ginkgo/testsuite -gotest %{import_path}/integration -gotest %{import_path}/internal/codelocation -gotest %{import_path}/internal/containernode -gotest %{import_path}/internal/failer -gotest %{import_path}/internal/leafnodes -gotest %{import_path}/internal/remote -gotest %{import_path}/internal/spec -gotest %{import_path}/internal/specrunner -gotest %{import_path}/internal/suite -gotest %{import_path}/internal/writer -gotest %{import_path}/reporters -gotest %{import_path}/types +%gotest %{import_path}/ginkgo/nodot +%gotest %{import_path}/ginkgo/testsuite +%gotest %{import_path}/integration +%gotest %{import_path}/internal/codelocation +%gotest %{import_path}/internal/containernode +%gotest %{import_path}/internal/failer +%gotest %{import_path}/internal/leafnodes +%gotest %{import_path}/internal/remote +%gotest %{import_path}/internal/spec +%gotest %{import_path}/internal/specrunner +%gotest %{import_path}/internal/suite +%gotest %{import_path}/internal/writer +%gotest %{import_path}/reporters +%gotest %{import_path}/types %endif +#define license tag if not already defined +%{!?_licensedir:%global license %doc} + %if 0%{?with_devel} %files devel -f devel.file-list -%{!?_licensedir:%global license %%doc} %license LICENSE %doc CHANGELOG.md README.md %dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} @@ -181,12 +175,15 @@ gotest %{import_path}/types %if 0%{?with_unit_test} %files unit-test -f unit-test.file-list -%{!?_licensedir:%global license %%doc} %license LICENSE %doc CHANGELOG.md README.md %endif %changelog +* Tue Aug 09 2016 jchaloup - 1.1.0-9 +- Polish spec file, enable devel and unit-test for epel7 + related: #1214619 + * Thu Jul 21 2016 Fedora Release Engineering - 1.1.0-8 - https://fedoraproject.org/wiki/Changes/golang1.7