Blame golang-github-go-tomb-tomb.spec

c89188e
%global goipath         github.com/go-tomb/tomb
c121316
%global commit          d5d1b5820637886def9eef33e03a27a9f166942c
17fc998
c89188e
%global import_path     gopkg.in/v2/tomb
c89188e
%global import_path_sec gopkg.in/tomb.v2
17fc998
7e1428d
%global v1_commit          dd632973f1e7218eb1089048e0798ec9ae7dceb8
7e1428d
%global v1_shortcommit     %(c=%{v1_commit}; echo ${c:0:7})
c89188e
%global v1_import_path     gopkg.in/v1/tomb
c89188e
%global v1_import_path_sec gopkg.in/tomb.v1
7e1428d
c89188e
%global devel_main      golang-gopkg-tomb-devel-v2
7e1428d
c89188e
%gometa
c89188e
c89188e
Name:           golang-github-go-tomb-tomb
17fc998
Version:        0
c89188e
Release:        15%{?dist}
c89188e
Summary:        The tomb package helps with clean goroutine termination in the Go language
17fc998
License:        BSD
c89188e
URL:            %{gourl}
c89188e
Source0:        %{gosource}
c89188e
Source1:        https://%{goipath}/archive/%{v1_commit}/tomb-%{v1_commit}.tar.gz
17fc998
17fc998
%description
c89188e
%{summary}.
17fc998
17fc998
%package devel
c89188e
Summary:        Enables Go programs to comfortably encode and decode YAML values
c89188e
BuildArch:      noarch
851a990
c89188e
BuildRequires:  golang(gopkg.in/check.v1)
c89188e
Requires:       golang(gopkg.in/check.v1)
17fc998
17fc998
%description devel
c89188e
%{summary}.
17fc998
17fc998
This package contains library source intended for
851a990
building other packages which use import path with
c89188e
%{v1_import_path} prefix.
7e1428d
c89188e
%package devel-v2
c89188e
Summary:        Enables Go programs to comfortably encode and decode YAML values
c89188e
BuildArch:      noarch
7e1428d
c89188e
%description devel-v2
c89188e
%{summary}.
7e1428d
7e1428d
This package contains library source intended for
7e1428d
building other packages which use import path with
c89188e
%{goipath} prefix.
851a990
851a990
%prep
c89188e
%setup -q -n tomb-%{v1_commit} -T -b 1
c89188e
%forgesetup
17fc998
17fc998
%install
c89188e
%goinstall
c89188e
%goinstall -i %{import_path} -o devel.file-list
c89188e
%goinstall -i %{import_path_sec} -o devel.file-list
c89188e
c89188e
cw=$(pwd)
c89188e
pushd ../tomb-%{v1_commit}
c89188e
%goinstall -i %{v1_import_path} -o ${cw}/v1_devel.file-list
c89188e
%goinstall -i %{v1_import_path_sec} -o ${cw}/v1_devel.file-list
c89188e
c89188e
# TODO(jchaloup): create rpm macros for this!!!
c89188e
#github.com/go-tomb/tomb -> gopkg.in/v2/tomb
c89188e
pushd %{buildroot}/%{gopath}/src/%{import_path}/
c89188e
sed -i 's/"github\.com\/go-tomb\/tomb/"gopkg\.in\/v2\/tomb/g' \
c89188e
        $(find . -name '*.go')
c89188e
#'github.com/go-tomb/tomb -> gopkg.in/tomb.v2
c89188e
cd %{buildroot}/%{gopath}/src/%{import_path_sec}/
c89188e
sed -i 's/"github\.com\/go-tomb\/tomb/"gopkg\.in\/tomb\.v2/g' \
c89188e
        $(find . -name '*.go')
c89188e
#gopkg.in/v1/tomb -> gopkg.in/tomb.v1
c89188e
cd %{buildroot}/%{gopath}/src/%{v1_import_path_sec}/
c89188e
sed -i 's/"gopkg\.in\/v1\/tomb/"gopkg\.in\/tomb\.v1/g' \
c89188e
        $(find . -name '*.go')
7e1428d
popd
7e7ec00
17fc998
%check
c89188e
%gochecks
c89188e
pushd %{buildroot}/%{gopath}/src/%{import_path}/
c89188e
%gochecks -i %{import_path}
c89188e
cd %{buildroot}/%{gopath}/src/%{import_path_sec}/
c89188e
%gochecks
c89188e
popd
17fc998
7e7ec00
#define license tag if not already defined
7e7ec00
%{!?_licensedir:%global license %doc}
7e7ec00
c89188e
%files devel -f v1_devel.file-list
7e7ec00
%license LICENSE
851a990
%doc README.md
7e1428d
c89188e
%files devel-v2 -f devel.file-list
7e1428d
%license LICENSE
7e1428d
%doc README.md
17fc998
17fc998
%changelog
c89188e
* Wed Oct 31 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.14.20181031gitd5d1b58
c89188e
- Update to new Go packaging
c89188e
- Bump to commit dd632973f1e7218eb1089048e0798ec9ae7dceb8 and d5d1b5820637886def9eef33e03a27a9f166942c
c89188e
70de83b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.13.gitd5d1b58
70de83b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
70de83b
cde14c1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.12.gitd5d1b58
cde14c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cde14c1
48a09b3
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.11.gitd5d1b58
48a09b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
48a09b3
05d8891
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.10.gitd5d1b58
05d8891
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
05d8891
c121316
* Mon Mar 27 2017 Jan Chaloupka <jchaloup@redhat.com> - 0-0.9.gitd5d1b58
c121316
- Bump to upstream d5d1b5820637886def9eef33e03a27a9f166942c
c121316
  related: #1249041
c121316
  resolves: #1435616
c121316
6dabde5
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.8.git14b3d72
6dabde5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6dabde5
4a1f062
* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.7.git14b3d72
4a1f062
- https://fedoraproject.org/wiki/Changes/golang1.7
4a1f062
7e1428d
* Fri Apr 15 2016 jchaloup <jchaloup@redhat.com> - 0-0.6.git14b3d72
7e1428d
- Extend with gopkg.in/tomb.v1
7e1428d
  related: #1249041
7e1428d
ca7a01b
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.5.git14b3d72
ca7a01b
- https://fedoraproject.org/wiki/Changes/golang1.6
ca7a01b
15892cb
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.4.git14b3d72
15892cb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
15892cb
7e7ec00
* Sat Sep 12 2015 jchaloup <jchaloup@redhat.com> - 0-0.3.git14b3d72
7e7ec00
- Update to spec-2.1
7e7ec00
  related: #1249041
7e7ec00
851a990
* Fri Jul 31 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.git14b3d72
851a990
- Update spec file to spec-2.0
851a990
  resolves: #1249041
851a990
17fc998
* Mon Jun 15 2015 Marek Skalick√Ĺ <mskalick@redhat.com> - 0-0.1.git14b3d72
17fc998
- First package for Fedora
17fc998
  resolves: #1232221