From 0350be78bc4c435700db61d7018c4af86e2dc8a4 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mar 03 2017 14:51:54 +0000 Subject: use hash-based tarball --- diff --git a/.gitignore b/.gitignore index 8ef957d..6071ace 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /suture-2.0.0.tar.gz +/suture-fe1c0d7.tar.gz diff --git a/golang-github-thejerf-suture.spec b/golang-github-thejerf-suture.spec index 2a03c41..a4d36a0 100644 --- a/golang-github-thejerf-suture.spec +++ b/golang-github-thejerf-suture.spec @@ -15,7 +15,6 @@ %global debug_package %{nil} %endif - %global provider github %global provider_tld com %global project thejerf @@ -26,6 +25,8 @@ %global commit fe1c0d795ff7a7e54fc54ef6afb36ee0adf0c276 %global shortcommit %(c=%{commit}; echo ${c:0:7}) +# commit fe1c0d795ff7a7e54fc54ef6afb36ee0adf0c276 == version 2.0.0 + Name: golang-%{provider}-%{project}-%{repo} Version: 2.0.0 @@ -33,14 +34,13 @@ Release: 1%{?dist} Summary: Supervisor trees for Go License: MIT URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz +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 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 %{summary} @@ -50,9 +50,6 @@ BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} Summary: %{summary} BuildArch: noarch -%if 0%{?with_check} && ! 0%{?with_bundled} -%endif - Provides: golang(%{import_path}) = %{version}-%{release} %description devel @@ -67,17 +64,10 @@ building other packages which use import path with %if 0%{?with_unit_test} && 0%{?with_devel} %package unit-test-devel Summary: Unit tests for %{name} package -%if 0%{?with_check} -#Here comes all BuildRequires: PACKAGE the unit tests -#in %%check section need for running -%endif # test subpackage tests code from devel subpackage Requires: %{name}-devel = %{version}-%{release} -%if 0%{?with_check} && ! 0%{?with_bundled} -%endif - %description unit-test-devel %{summary} @@ -87,7 +77,7 @@ providing packages with %{import_path} prefix. %prep -%setup -q -n %{repo}-%{version} +%setup -q -n %{repo}-%{commit} %build @@ -98,6 +88,7 @@ providing packages with %{import_path} prefix. %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list + # find all *.go but no *_test.go files and generate devel.file-list for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go") ; do dirprefix=$(dirname $file) @@ -115,6 +106,7 @@ done # testing files for this project %if 0%{?with_unit_test} && 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ + # find all *_test.go files and generate unit-test-devel.file-list for file in $(find . -iname "*_test.go") ; do dirprefix=$(dirname $file) @@ -151,6 +143,7 @@ export GOPATH=%{buildroot}/%{gopath}:%{gopath} %gotest %{import_path} %endif + #define license tag if not already defined %{!?_licensedir:%global license %doc} diff --git a/sources b/sources index a6a71dc..cb51723 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (suture-2.0.0.tar.gz) = c6f993cbcfb2a521061d20880b544e844bc0c8bca6a2afb234c69a1ae7c2d8b72abf213440b0f2c2f4040267641ebda6ec8fef874d86aa1de666743c65d9643f +SHA512 (suture-fe1c0d7.tar.gz) = b1abd2c407004bf0f9414ca9313a6672d9c6cf7eb1b436b41c7caf7a3ad41a9f39a522dd8047b2dea12beeef215d0d317633cbebb263c58be5e77da36e91082d