diff --git a/golang-github-pkg-errors.spec b/golang-github-pkg-errors.spec index 7424b04..519c63b 100644 --- a/golang-github-pkg-errors.spec +++ b/golang-github-pkg-errors.spec @@ -1,71 +1,65 @@ -# http://github.com/pkg/errors +# Generated by go2rpm +%bcond_without check + +# https://github.com/pkg/errors %global goipath github.com/pkg/errors Version: 0.8.1 %gometa +%global common_description %{expand: +Package Errors provides simple error handling primitives.} + +%global golicenses LICENSE +%global godocs README.md + +%global gosupfiles glide.lock glide.yaml + Name: %{goname} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Simple error handling primitives -# Detected licences -# - BSD (2 clause) at 'LICENSE' + +# Upstream license specification: BSD-2-Clause License: BSD URL: %{gourl} Source0: %{gosource} Source1: glide.yaml Source2: glide.lock -Patch0001: 0001-Fix-build-against-Go-1.12.patch +Patch0: 0001-Fix-build-against-Go-1.12.patch %description -%{summary} - -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel -%{summary} +%{common_description} -This package contains library source intended for -building other packages which use import path with -%{goipath} prefix. +%gopkg %prep -%forgeautosetup -p1 -cp %{SOURCE1} %{SOURCE2} . +%goprep +%patch0 -p1 +cp %{S:1} %{S:2} . %install -%goinstall glide.lock glide.yaml +%gopkginstall -%check -%gochecks - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%pretrans -p devel --- Define the path to directory being replaced below. --- DO NOT add a trailing slash at the end. -path = "/usr/share/gocode/src/github.com/pkg/errors/glide.lock" +# Remove in F33 +# Remove erroneous glide.lock folder +%pretrans devel -p +path = "%{gopath}/src/%{goipath}/glide.lock" st = posix.stat(path) if st and st.type == "directory" then - status = os.rename(path, path .. ".rpmmoved") - if not status then - suffix = 0 - while not status do - suffix = suffix + 1 - status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) - end - os.rename(path, path .. ".rpmmoved") - end + os.remove(path) end -%files devel -f devel.file-list -%license LICENSE -%doc README.md -%ghost /usr/share/gocode/src/github.com/pkg/errors/glide.lock.rpmmoved +%if %{with check} +%check +%gocheck +%endif + +%gopkgfiles %changelog +* Thu Apr 18 03:38:35 CEST 2019 Robert-André Mauchin - 0.8.1-5 +- Update to new macros + * Mon Feb 18 2019 Elliott Sales de Andrade - 0.8.1-4 - Backport patches to fix Go 1.12