nim / rpms / go-compilers

Forked from rpms/go-compilers 6 years ago
Clone
678f61f
%global debug_package   %{nil}
678f61f
c3b8cd6
%global commit          9f4330a0f4437ca61ba92f9f30e34424c6742ad6
678f61f
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
678f61f
f408318
%global m_commit        4d469a3d37c21353fbd6bb306ce707dc4151fd1e
678f61f
%global m_shortcommit   %(c=%{m_commit}; echo ${c:0:7})
678f61f
5562fc0
Name:           go-compilers
5562fc0
Version:        1
237918a
Release:        33%{?dist}
5562fc0
Summary:        Go language compilers for various architectures
5562fc0
License:        GPLv3+
678f61f
Source0:        https://github.com/gofed/symbols-extractor/archive/%{commit}/symbols-extractor-%{shortcommit}.tar.gz
678f61f
Source1:        https://github.com/gofed/go-macros/archive/%{m_commit}/go-macros-%{m_shortcommit}.tar.gz
5562fc0
5562fc0
ExclusiveArch:  %{go_arches}
5562fc0
5562fc0
# for install, cut and rm commands
5562fc0
BuildRequires:  coreutils
5562fc0
# for go specific macros
5562fc0
BuildRequires:  go-srpm-macros
5562fc0
5562fc0
%description
5562fc0
The package provides correct golang language compiler
5562fc0
base on an architectures.
5562fc0
5562fc0
%ifarch %{golang_arches}
5562fc0
%package golang-compiler
5562fc0
Summary:       compiler for golang
5562fc0
678f61f
BuildRequires: golang
678f61f
5562fc0
Requires:      golang
188f240
Requires:      golist
5562fc0
ada8744
Provides:      compiler(go-compiler) = 2
5562fc0
Provides:      compiler(golang)
5562fc0
5562fc0
%description golang-compiler
5562fc0
Compiler for golang.
5562fc0
%endif
5562fc0
5562fc0
%ifarch %{gccgo_arches}
5562fc0
%package gcc-go-compiler
5562fc0
Summary:       compiler for gcc-go
5562fc0
7d51777
# GCC>=5 holds in Fedora now
7d51777
Requires:      gcc-go
5562fc0
e88d34d
Provides:      compiler(go-compiler) = 1
5562fc0
Provides:      compiler(gcc-go)
5562fc0
5562fc0
%description gcc-go-compiler
5562fc0
Compiler for gcc-go.
5562fc0
%endif
5562fc0
188f240
%ifarch %{golang_arches}
188f240
%package -n golist
188f240
Version: 0.0.1
188f240
Summary: List the resources required and provided by a Go project
188f240
License: BSD
188f240
188f240
%description -n golist
188f240
golist is a small utility used to list the resources required and provided by a
188f240
Go (Golang) project. It is the analysis engine on which go-rpm-macros is built.
188f240
%endif
188f240
5562fc0
%prep
678f61f
%setup -q -n symbols-extractor-%{commit}
678f61f
%setup -q -n go-macros-%{m_commit} -T -b 1
5562fc0
5562fc0
%build
678f61f
mkdir -p src/github.com/gofed
678f61f
pushd ../symbols-extractor-%{commit}
678f61f
export GOPATH=$(pwd):%{gopath}
678f61f
# TODO(jchaloup): build it as part of the golang compiler or to-be symbols-extractor package
678f61f
sed -i "s/.*\/cmd\/extract.*/\t\\\\/" Makefile
678f61f
sed -i "s/.*\/cmd\/checkapi.*/\t\\\\/" Makefile
678f61f
make
678f61f
popd
5562fc0
5562fc0
%install
5562fc0
%ifarch %{golang_arches}
bf6445f
# executables
bf6445f
install -m 755 -D bin/go-rpm-integration %{buildroot}%{_bindir}/go-rpm-integration
bf6445f
install -m 755 -D rpm/gobundled.prov %{buildroot}%{_rpmconfigdir}/gobundled.prov
bf6445f
install -m 755 -D rpm/gosymlink.deps %{buildroot}%{_rpmconfigdir}/gosymlink.deps
bf6445f
# macros
bf6445f
install -m 644 -D rpm/macros.d/macros.go-compilers-golang %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compilers-golang
678f61f
install -m 644 -D rpm/macros.d/macros.go-rpm %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-rpm
bf6445f
# attrs
678f61f
install -m 644 -D rpm/fileattrs/go.attr %{buildroot}%{_rpmconfigdir}/fileattrs/go.attr
bf6445f
install -m 644 -D rpm/fileattrs/gobundled.attr %{buildroot}%{_rpmconfigdir}/fileattrs/gobundled.attr
bf6445f
install -m 644 -D rpm/fileattrs/gosymlink.attr %{buildroot}%{_rpmconfigdir}/fileattrs/gosymlink.attr
678f61f
678f61f
pushd ../symbols-extractor-%{commit}
678f61f
install -D -p -m 0755 golist %{buildroot}%{_bindir}/golist
678f61f
popd
5562fc0
%endif
5562fc0
5562fc0
%ifarch %{gccgo_arches}
bf6445f
install -m 644 -D rpm/macros.d/macros.go-compilers-gcc %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compilers-gcc
5562fc0
%endif
5562fc0
5562fc0
%ifarch %{golang_arches}
5562fc0
%files golang-compiler
bf6445f
%{_rpmconfigdir}/macros.d/macros.go-compilers-golang
678f61f
%{_rpmconfigdir}/macros.d/macros.go-rpm
bf6445f
%{_rpmconfigdir}/gobundled.prov
bf6445f
%{_rpmconfigdir}/gosymlink.deps
678f61f
%{_rpmconfigdir}/fileattrs/go.attr
bf6445f
%{_rpmconfigdir}/fileattrs/gobundled.attr
bf6445f
%{_rpmconfigdir}/fileattrs/gosymlink.attr
bf6445f
%{_bindir}/go-rpm-integration
5562fc0
%endif
5562fc0
5562fc0
%ifarch %{gccgo_arches}
5562fc0
%files gcc-go-compiler
bf6445f
%{_rpmconfigdir}/macros.d/macros.go-compilers-gcc
5562fc0
%endif
5562fc0
188f240
%ifarch %{golang_arches}
188f240
%files -n golist
188f240
%{_bindir}/golist
188f240
%endif
188f240
5562fc0
%changelog
237918a
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1-33
237918a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
237918a
c3b8cd6
* Sun Aug 26 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-32
c3b8cd6
- Rebuild the golist with go1.11
c3b8cd6
5fb0836
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1-31
5fb0836
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5fb0836
f408318
* Mon May 28 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-30
f408318
- Bump to 4d469a3d37c21353fbd6bb306ce707dc4151fd1e
f408318
  Extend .goipath with commit
f408318
  Nits and improvements
f408318
fbf4bca
* Tue Mar 20 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-29
fbf4bca
- Bump to c259c4ed880d10667974c460e5259605e32330f0
fbf4bca
  Fix order of flags for gochecks and goinstall macros where -i and any of -d, -t, -r, -e are specified
fbf4bca
f266cb5
* Fri Mar 16 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-28
f266cb5
- Bump to 6f0cadc4c48f93f02eb573649e2a94eeef12f15c
f266cb5
81a859f
* Fri Mar 09 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-27
81a859f
- allow supplying additional -tags arguments to %gobuild (via $BUILDTAGS)
81a859f
  Upstream: https://github.com/gofed/go-macros/issues/22
81a859f
3cab26d
* Wed Mar 07 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-26
3cab26d
- Ignore testdata and all files/dirs that begin with . or _
3cab26d
  Upstream: https://github.com/gofed/go-macros/issues/21
3cab26d
bf6445f
* Sun Mar 04 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-25
bf6445f
- Re-implement bash part of the macros
bf6445f
4ccfaf6
* Thu Mar 01 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-24
4ccfaf6
- https://github.com/gofed/go-macros/issues/6: golist --provided should accept attribute decorators
4ccfaf6
- https://github.com/gofed/go-macros/issues/5: The Go utilities used by the macros should accept arbitrary numbers of flags
4ccfaf6
1f1e8ae
* Wed Feb 28 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-23
1f1e8ae
- Copy hidden files as well
1f1e8ae
c601fc5
* Mon Feb 26 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-22
c601fc5
- Fix the golist --to-install to count Cgo files as well
c601fc5
e695125
* Sat Feb 24 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-21
e695125
- Allow to ignore root directory
e695125
62d4c99
* Fri Feb 23 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-20
62d4c99
- Set _dwz_low_mem_die_limit only when a go binary is built
62d4c99
0f5a08f
* Sun Feb 18 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-19
0f5a08f
- New macros: __go_ignore_dirs, __go_ignore_trees, __go_ignore_regex
0f5a08f
678f61f
* Sun Feb 18 2018 Jan Chaloupka <jchaloup@redhat.com> - 1-18
678f61f
- Move all macros under github.com/gofed/go-macros repository
678f61f
- Provide new macros autogenerating parts of Go spec files (int testing phase)
678f61f
c2fc43f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1-17
c2fc43f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c2fc43f
28e047c
* Tue Jan 16 2018 Jakub Čajka <jcajka@redhat.com> - 1-16
28e047c
- use build mode pie also for testing(we are getting pie ld flag from hardening), this resolves linker issues on ppc64le
28e047c
7d2b700
* Thu Nov 30 2017 Jakub Čajka <jcajka@redhat.com> - 1-15
7d2b700
- allow to specify __golang_extldflags macro to specify extldflags with go* macros
7d2b700
- Resolves: rhbz#1502305
7d2b700
4cc5de7
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-14
4cc5de7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4cc5de7
46135e1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-13
46135e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
46135e1
d201919
* Fri Jul 14 2017 Jakub Čajka <jcajka@redhat.com> - 1-12
d201919
- rebuild for ppc64 drop
d201919
29f5437
* Wed Feb 15 2017 Jakub Čajka <jcajka@redhat.com> - 1-11
29f5437
- pie is not supported on ppc64
29f5437
2165e58
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-10
2165e58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2165e58
a842527
* Fri Jan 27 2017 Jakub Čajka <jcajka@redhat.com> - 1-9
a842527
- Add crash traceback level to golang as default
a842527
- Switch to PIE and push distribution ld flags
a842527
- Resolves BZ#1413529
a842527
- Related BZ#1411242
a842527
fd11467
* Wed Jul 20 2016 Jakub Čajka <jcajka@redhat.com> - 1-8
fd11467
- Build for s390x switch to golang
fd11467
- Related: bz1357394
fd11467
90738b6
* Wed Apr 13 2016 Dan Horák <dan[at]danny.cz> - 1-7
90738b6
- fix bug in gcc-go version of gotest macro
90738b6
5f6f6ef
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1-6
5f6f6ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5f6f6ef
ada8744
* Thu Jan 28 2016 Jakub Čajka <jcajka@redhat.com> - 1-5
ada8744
- Build for {power64} switch to golang
ada8744
e88d34d
* Fri Jan 22 2016 Jakub Čajka <jcajka@redhat.com> - 1-4
e88d34d
- version provides to make seamless transition between compilers possible
e88d34d
- Resolves: bz#1300717
e88d34d
7d51777
* Thu Nov 12 2015 Jakub Čajka <jcajka@redhat.com> - 1-3
7d51777
- remove version requirement from gcc-go subpackage to avoid cyclic
7d51777
  dependency due to macro declaration in subpackage
7d51777
b8c1ec6
* Thu Sep 10 2015 jchaloup <jchaloup@redhat.com> - 1-2
b8c1ec6
- go_compiler macro must be in go-srpm-macros package as it is used
b8c1ec6
  to pick compiler(go-compiler) which would provide go_compiler
b8c1ec6
5562fc0
* Tue Jul 07 2015 Jan Chaloupka <jchaloup@redhat.com> - 1-1
5562fc0
- Initial commit
5562fc0
  resolves: #1258182