diff --git a/.gitignore b/.gitignore index 879c242..8165d01 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/gucumber-e8116c9.tar.gz +/gucumber-71608e2.tar.gz diff --git a/golang-github-lsegal-gucumber.spec b/golang-github-lsegal-gucumber.spec index 4b06b33..e7ce329 100644 --- a/golang-github-lsegal-gucumber.spec +++ b/golang-github-lsegal-gucumber.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 @@ -20,24 +31,25 @@ %global provider github %global provider_tld com -%global project lsegal +%global project gucumber %global repo gucumber -# https://github.com/lsegal/gucumber +# https://github.com/gucumber/gucumber %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit e8116c9c66e641e9f81fc0a79fac923dfc646378 +%global sec_import_path github.com/lsegal/gucumber +%global commit 71608e2f6e76fd4da5b09a376aeec7a5c0b5edbc %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: golang-%{provider}-%{project}-%{repo} Version: 0 -Release: 0.4.git%{shortcommit}%{?dist} +Release: 0.5.git%{shortcommit}%{?dist} Summary: An implementation of Cucumber BDD-style testing for Go License: MIT URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz # 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} @@ -59,6 +71,8 @@ Requires: golang(github.com/stretchr/testify/assert) Provides: golang(%{import_path}) = %{version}-%{release} Provides: golang(%{import_path}/gherkin) = %{version}-%{release} +Provides: golang(%{sec_import_path}) = %{version}-%{release} +Provides: golang(%{sec_import_path}/gherkin) = %{version}-%{release} %description devel %{summary} @@ -88,6 +102,7 @@ providing packages with %{import_path} prefix. %prep %setup -q -n %{repo}-%{commit} +chmod -x LICENSE.txt README.md runner.go %build @@ -97,14 +112,26 @@ chmod -x README.md LICENSE.txt # source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +install -d -p %{buildroot}/%{gopath}/src/%{sec_import_path}/ echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list +echo "%%dir %%{gopath}/src/%%{sec_import_path}/." >> devel.file-list # find all *.go but no *_test.go files and generate devel.file-list for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list 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 + + echo "%%dir %%{gopath}/src/%%{sec_import_path}/$(dirname $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 + +pushd %{buildroot}/%{gopath}/src/%{sec_import_path}/ +sed -i 's/"github\.com\/gucumber\/gucumber/"github\.com\/lsegal\/gucumber/g' \ + $(find . -name '*.go') +popd %endif # testing files for this project @@ -135,7 +162,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %global gotest go test %endif -%gotest %{import_path} +#%%gotest %%{import_path} %gotest %{import_path}/gherkin %endif @@ -156,6 +183,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %endif %changelog +* Sat Jan 21 2017 Jan Chaloupka - 0-0.5.git71608e2 +- Bump to upstream 71608e2f6e76fd4da5b09a376aeec7a5c0b5edbc + resolves: #1415383 + * Thu Jul 21 2016 Fedora Release Engineering - 0-0.4.gite8116c9 - https://fedoraproject.org/wiki/Changes/golang1.7 diff --git a/sources b/sources index 9afce87..1b713d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a45de4cc160122819ffc2f3b08387f9f gucumber-e8116c9.tar.gz +SHA512 (gucumber-71608e2.tar.gz) = 79ef7a44c88f73a16fae1dceb6f585b2dc9cbd9f0ab6fab2bfab29801b99dba37ede7faec44f5a706a3a67a4bf7176d1f3ee66ba9d21b25bceb3c42ab167734a