diff --git a/golang-gopkg-check.spec b/golang-gopkg-check.spec index a29a980..0860287 100644 --- a/golang-gopkg-check.spec +++ b/golang-gopkg-check.spec @@ -1,17 +1,28 @@ -%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 -# test fails +# Run tests in check section +# Failing on aarch and arm %global with_check 0 +# Generate unit-test rpm %global with_unit_test 1 -%else -%global with_devel 1 -%global with_bundled 0 -%global with_debug 0 -%global with_check 0 -%global with_unit_test 1 -%endif %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 @@ -38,7 +49,7 @@ Name: golang-gopkg-%{repo} Version: 1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Rich testing for the Go language License: BSD URL: https://%{provider_prefix} @@ -47,7 +58,7 @@ Source1: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcomm Obsoletes: golang-launchpad-gocheck # 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}} +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} @@ -79,8 +90,6 @@ building other packages which use import path with %if 0%{?with_unit_test} %package unit-test Summary: Unit tests for %{name} package -# 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} %if 0%{?with_check} #Here comes all BuildRequires: PACKAGE the unit tests @@ -180,6 +189,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %endif %changelog +* Fri Jan 20 2017 Jan Chaloupka - 1-13 +- Polish the spec file + related: #1248138 + * Tue Aug 09 2016 jchaloup - 1-12 - Enable devel and unit-test for epel7 related: #1248138