nim / rpms / go-compilers

Forked from rpms/go-compilers 2 years ago
Clone

Blame go-compilers.spec

63f006
Name:    go-compilers
63f006
Version: 3
e09f75
Release: 0.10%{?dist}
63f006
Summary: rpm automation to create Go language (golang) packages
63f006
License: GPLv3+
63f006
63f006
# This file contains Go architecture definitions which are also used here
63f006
# Therefore, changing those requires a double rebuild
63f006
Source0: macros.go-srpm
63f006
Source1: macros.go-rpm
63f006
63f006
# Autodeps
63f006
Source10: go.attr
63f006
Source11: go.prov
63f006
Source12: go.req
63f006
63f006
# Compiler definitions
63f006
Source20: macros.golang-compiler
63f006
Source21: macros.gcc-go-compiler
5562fc
5562fc
ExclusiveArch:  %{go_arches}
5562fc
5562fc
%description
63f006
This package provides rpm automation to simplify the creation of Go language
63f006
(golang) packages on various architectures:
63f006
 — SRPM-stage macros
63f006
 — Build-stage rpm macros
63f006
 — Go rpm autodeps (provides and requires)
63f006
 — correct Go compiler definitions for each supported architecture
63f006
63f006
%package -n go-srpm-macros
63f006
Summary:   SRPM-stage rpm automation for Go packages
63f006
BuildArch: noarch
63f006
Requires:  redhat-rpm-config >= 73
63f006
63f006
%description -n go-srpm-macros
63f006
This package provides SRPM-stage rpm automation to simplify the creation of Go
63f006
language (golang) packages on various architectures.
63f006
63f006
It limits itself to the automation subset required to create Go SRPM packages
63f006
and needs to be included in the default build root.
63f006
63f006
The rest of the automation is provided by the go-rpm-macros package, that
63f006
go-srpm-macros will pull in for Go packages only.
63f006
63f006
%package -n go-rpm-macros
63f006
Summary:   Build-stage rpm automation for Go packages
63f006
BuildArch: noarch
63f006
Requires:  lua-argparse
63f006
Requires:  compiler(go-compiler)
63f006
Requires:  go-srpm-macros = %{version}-%{release}
63f006
63f006
%description -n go-rpm-macros
63f006
This package provides build-stage rpm automation to simplify the creation of Go
63f006
language (golang) packages on various architectures.
63f006
63f006
It does not need to be included in the default build root: go-srpm-macros will
63f006
pull it in for Go packages only.
5562fc
5562fc
%ifarch %{golang_arches}
63f006
%package -n golang-compiler
63f006
Summary:   compiler for golang
63f006
Requires:  golang
63f006
Provides:  compiler(go-compiler) = 2
63f006
Provides:  compiler(golang)
63f006
Provides:  go-compilers-golang-compiler = %{version}-%{release}
63f006
Obsoletes: go-compilers-golang-compiler < %{version}-%{release}
63f006
63f006
%description -n golang-compiler
5562fc
Compiler for golang.
63f006
5562fc
%endif
5562fc
5562fc
%ifarch %{gccgo_arches}
63f006
%package -n gcc-go-compiler
63f006
Summary:   compiler for gcc-go
7d5177
# GCC>=5 holds in Fedora now
63f006
Requires:  gcc-go
63f006
Provides:  compiler(go-compiler) = 1
63f006
Provides:  compiler(gcc-go)
63f006
Provides:  go-compilers-gcc-go-compiler = %{version}-%{release}
63f006
Obsoletes: go-compilers-gcc-go-compiler < %{version}-%{release}
5562fc
63f006
%description -n gcc-go-compiler
5562fc
Compiler for gcc-go.
5562fc
%endif
5562fc
63f006
%install
63f006
install -m 0755 -vd %{buildroot}%{_rpmconfigdir}/{macros.d,fileattrs}/
5562fc
63f006
install -m 0644 -vp %{SOURCE0} %{SOURCE1} \
63f006
                    %{buildroot}%{_rpmconfigdir}/macros.d/
63f006
63f006
install -m 0644 -vp %{SOURCE10} \
63f006
                    %{buildroot}%{_rpmconfigdir}/fileattrs/
63f006
install -m 0755 -vp %{SOURCE11} %{SOURCE12} \
63f006
                    %{buildroot}%{_rpmconfigdir}/
5562fc
5562fc
%ifarch %{golang_arches}
63f006
install -m 0644 -vp %{SOURCE20} \
63f006
                    %{buildroot}%{_rpmconfigdir}/macros.d/
5562fc
%endif
5562fc
5562fc
%ifarch %{gccgo_arches}
63f006
install -m 0644 -vp %{SOURCE21} \
63f006
                    %{buildroot}%{_rpmconfigdir}/macros.d/
5562fc
%endif
5562fc
63f006
%files -n go-srpm-macros
63f006
%{_rpmconfigdir}/macros.d/macros.go-srpm
63f006
63f006
%files -n go-rpm-macros
63f006
%{_rpmconfigdir}/macros.d/macros.go-rpm
63f006
%{_rpmconfigdir}/fileattrs/go.attr
63f006
%{_rpmconfigdir}/go.prov
63f006
%{_rpmconfigdir}/go.req
63f006
5562fc
%ifarch %{golang_arches}
63f006
%files -n golang-compiler
5562fc
%{_rpmconfigdir}/macros.d/macros.golang-compiler
5562fc
%endif
5562fc
5562fc
%ifarch %{gccgo_arches}
63f006
%files -n gcc-go-compiler
5562fc
%{_rpmconfigdir}/macros.d/macros.gcc-go-compiler
5562fc
%endif
5562fc
5562fc
%changelog
e09f75
* Wed Feb 14 2018 Nicolas Mailhot <nim@fedoraproject.org> - 3-0.10
63f006
- merge go-srpm-macros and go-compilers to reduce the number of Go rpm macro
63f006
  packages and make sure all the macros are kept in sync
63f006
- simplify subpackage naming
63f006
- add more Go packaging automation, including autodeps:
63f006
  https://fedoraproject.org/wiki/More_Go_packaging
63f006
c2fc43
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1-17
c2fc43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c2fc43
28e047
* Tue Jan 16 2018 Jakub Čajka <jcajka@redhat.com> - 1-16
28e047
- use build mode pie also for testing(we are getting pie ld flag from hardening), this resolves linker issues on ppc64le
28e047
7d2b70
* Thu Nov 30 2017 Jakub Čajka <jcajka@redhat.com> - 1-15
7d2b70
- allow to specify __golang_extldflags macro to specify extldflags with go* macros
7d2b70
- Resolves: rhbz#1502305
7d2b70
4cc5de
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-14
4cc5de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4cc5de
46135e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-13
46135e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
46135e
d20191
* Fri Jul 14 2017 Jakub Čajka <jcajka@redhat.com> - 1-12
d20191
- rebuild for ppc64 drop
d20191
29f543
* Wed Feb 15 2017 Jakub Čajka <jcajka@redhat.com> - 1-11
29f543
- pie is not supported on ppc64
29f543
2165e5
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1-10
2165e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2165e5
a84252
* Fri Jan 27 2017 Jakub Čajka <jcajka@redhat.com> - 1-9
a84252
- Add crash traceback level to golang as default
a84252
- Switch to PIE and push distribution ld flags
a84252
- Resolves BZ#1413529
a84252
- Related BZ#1411242
a84252
fd1146
* Wed Jul 20 2016 Jakub Čajka <jcajka@redhat.com> - 1-8
fd1146
- Build for s390x switch to golang
fd1146
- Related: bz1357394
fd1146
90738b
* Wed Apr 13 2016 Dan Horák <dan[at]danny.cz> - 1-7
90738b
- fix bug in gcc-go version of gotest macro
90738b
5f6f6e
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1-6
5f6f6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5f6f6e
ada874
* Thu Jan 28 2016 Jakub Čajka <jcajka@redhat.com> - 1-5
ada874
- Build for {power64} switch to golang
ada874
e88d34
* Fri Jan 22 2016 Jakub Čajka <jcajka@redhat.com> - 1-4
e88d34
- version provides to make seamless transition between compilers possible
e88d34
- Resolves: bz#1300717
e88d34
7d5177
* Thu Nov 12 2015 Jakub Čajka <jcajka@redhat.com> - 1-3
7d5177
- remove version requirement from gcc-go subpackage to avoid cyclic
7d5177
  dependency due to macro declaration in subpackage
7d5177
b8c1ec
* Thu Sep 10 2015 jchaloup <jchaloup@redhat.com> - 1-2
b8c1ec
- go_compiler macro must be in go-srpm-macros package as it is used
b8c1ec
  to pick compiler(go-compiler) which would provide go_compiler
b8c1ec
5562fc
* Tue Jul 07 2015 Jan Chaloupka <jchaloup@redhat.com> - 1-1
5562fc
- Initial commit
5562fc
  resolves: #1258182