diff --git a/.gitignore b/.gitignore index 8628c52..6622360 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /repr-d44565c.tar.gz +/repr-d37bc2a10ba1a7951e19dd5dc10f7d59b142d8d7.tar.gz diff --git a/golang-github-alecthomas-repr.spec b/golang-github-alecthomas-repr.spec index 3572330..ffa157b 100644 --- a/golang-github-alecthomas-repr.spec +++ b/golang-github-alecthomas-repr.spec @@ -1,87 +1,59 @@ -%global debug_package %{nil} - -%global provider github -%global provider_tld com -%global project alecthomas -%global repo repr # https://github.com/alecthomas/repr -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit d44565ca483f0ed23c2ac9cda62c966b116e77a3 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global goipath github.com/alecthomas/repr +%global commit d37bc2a10ba1a7951e19dd5dc10f7d59b142d8d7 + +%gometa -Name: golang-%{provider}-%{project}-%{repo} +Name: %{goname} Version: 0 -Release: 0.3.git%{shortcommit}%{?dist} +Release: 0.4%{?dist} Summary: Python's repr() for Go +# Detected licences +# - Expat License at 'COPYING' License: MIT -URL: https://%{provider_prefix} -Source0: %{url}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +URL: %{gourl} +Source0: %{gosource} -# 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} +BuildRequires: golang(github.com/stretchr/testify/assert) %description -%{summary}. +%{summary} + %package devel -Summary: %{summary} -BuildArch: noarch -BuildRequires: golang(github.com/stretchr/testify/assert) -Provides: golang(%{import_path}) = %{version}-%{release} +Summary: %{summary} +BuildArch: noarch %description devel -%{summary}. +%{summary} This package contains library source intended for building other packages which use import path with -%{import_path} prefix. - -%package unit-test-devel -Summary: Unit tests for %{name} package -BuildArch: noarch -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%description unit-test-devel -%{summary}. - -This package contains unit tests for project -providing packages with %{import_path} prefix. +%{goipath} prefix. %prep -%setup -q -n %{repo}-%{commit} +%forgeautosetup -%build %install -# source codes for building projects -install -d %{buildroot}%{gopath}/src/%{import_path}/ -install -m644 repr.go %{buildroot}%{gopath}/src/%{import_path}/ -install -m644 repr_test.go %{buildroot}%{gopath}/src/%{import_path}/ +%goinstall -%check -export GOPATH=%{buildroot}%{gopath}:%{gopath} -%if ! 0%{?gotest:1} -%global gotest go test -%endif +%check +%gochecks -%gotest %{import_path} -%files devel -%doc README.md +%files devel -f devel.file-list %license COPYING -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%{gopath}/src/%{import_path}/repr.go +%doc README.md -%files unit-test-devel -%{gopath}/src/%{import_path}/repr_test.go %changelog +* Sun Nov 11 2018 Robert-André Mauchin - 0-0.4.20181111gitd37bc2a +- Bump to commit d37bc2a10ba1a7951e19dd5dc10f7d59b142d8d7 +- Update to new Go packaging + * Fri Jul 13 2018 Fedora Release Engineering - 0-0.3.gitd44565c - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild @@ -90,3 +62,4 @@ export GOPATH=%{buildroot}%{gopath}:%{gopath} * Fri Aug 11 2017 mosquito - 0-0.1.gitd44565c - Initial package build + diff --git a/sources b/sources index 0cf8c19..b46d48b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (repr-d44565c.tar.gz) = c6e8398b2fd54672913fc9adbd2423c8bc7107d5646e5a072478caa0452ff57f4ebd427c1e9c5979270e11026b644912183ea8043af3a9ad3b4f72d04144d4a8 +SHA512 (repr-d37bc2a10ba1a7951e19dd5dc10f7d59b142d8d7.tar.gz) = d3231d3b7d17f89f229cda1aa7be7fb112d57eeba5d7cd4beff7f0b8e92662b2fe3a3037db95f857116166b2c2a06b867ea24b454d2c4b48399b036c67822e18