2010-10-08 16:25:58 +02:00
|
|
|
#
|
2011-11-04 10:06:56 +01:00
|
|
|
# spec file for package go
|
|
|
|
#
|
2023-04-29 01:29:50 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2010-10-08 16:25:58 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-05 05:22:34 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-11-04 10:06:56 +01:00
|
|
|
#
|
|
|
|
|
2020-07-16 08:49:50 +02:00
|
|
|
# NOTE: This logic must come from the latest go1.x package specfile.
|
|
|
|
# We only build go-race on supported systems.
|
|
|
|
%if 0%{suse_version} >= 1500 || 0%{?sle_version} >= 150000
|
2022-08-25 17:47:43 +02:00
|
|
|
%define tsan_arch x86_64 aarch64 s390x ppc64le
|
2019-03-11 21:46:24 +01:00
|
|
|
%else
|
2020-07-16 08:49:50 +02:00
|
|
|
# Cannot use {nil} here (ifarch doesn't like it) so just make up a fake
|
|
|
|
# architecture that no build will ever match.
|
|
|
|
%define tsan_arch openSUSE_FAKE_ARCH
|
2019-03-11 21:46:24 +01:00
|
|
|
%endif
|
2016-06-17 08:49:40 +02:00
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
Name: go
|
2023-08-10 07:20:52 +02:00
|
|
|
Version: 1.21
|
2020-07-16 08:49:50 +02:00
|
|
|
# Version must always be a valid golang(API) version
|
|
|
|
%define api_version %{version}
|
2011-06-30 11:18:52 +02:00
|
|
|
Release: 0
|
2010-10-08 16:25:58 +02:00
|
|
|
Summary: A compiled, garbage-collected, concurrent programming language
|
2011-09-02 11:15:17 +02:00
|
|
|
License: BSD-3-Clause
|
2023-04-29 01:29:50 +02:00
|
|
|
Group: Development/Languages/Go
|
2013-08-13 09:25:05 +02:00
|
|
|
Url: http://golang.org
|
2017-12-22 10:22:22 +01:00
|
|
|
Source: README
|
2017-05-24 13:06:00 +02:00
|
|
|
Recommends: go-doc = %{version}
|
2020-07-16 09:36:29 +02:00
|
|
|
ExclusiveArch: %ix86 x86_64 %arm aarch64 ppc64 ppc64le s390x riscv64
|
2018-11-13 10:56:18 +01:00
|
|
|
# We provide golang(API) so that projects can Prefer: go. Any project using Go
|
|
|
|
# code with golang(API) BuildRequires should add Prefer: go.
|
2020-07-16 08:49:50 +02:00
|
|
|
Provides: golang(API) = %{api_version}
|
2022-02-01 23:26:51 +01:00
|
|
|
# We provide this for RH/Fedora compatibility
|
|
|
|
Provides: golang = %{version}
|
2020-07-16 08:49:50 +02:00
|
|
|
# Make this both Requires and BuildRequires go1.x so that we get build errors
|
|
|
|
# if it is missing.
|
|
|
|
BuildRequires: go%{api_version}
|
|
|
|
Requires: go%{api_version}
|
2010-10-08 16:25:58 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Go is an expressive, concurrent, garbage collected systems programming language
|
|
|
|
that is type safe and memory safe. It has pointers but no pointer arithmetic.
|
|
|
|
Go has fast builds, clean syntax, garbage collection, methods for any type, and
|
|
|
|
run-time reflection. It feels like a dynamic language but has the speed and
|
|
|
|
safety of a static language.
|
|
|
|
|
|
|
|
%package doc
|
2012-04-02 11:37:35 +02:00
|
|
|
Summary: Go documentation
|
2017-08-23 16:01:00 +02:00
|
|
|
License: BSD-3-Clause
|
2010-10-08 16:25:58 +02:00
|
|
|
Group: Documentation/Other
|
2022-02-01 23:26:51 +01:00
|
|
|
# We provide this for RH/Fedora compatibility
|
|
|
|
Provides: golang-docs = %{version}
|
2017-05-24 13:06:00 +02:00
|
|
|
Requires: go = %{version}
|
2020-07-16 08:49:50 +02:00
|
|
|
Supplements: go = %{version}
|
|
|
|
Requires: go%{api_version}-doc
|
2010-10-08 16:25:58 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Go examples and documentation.
|
|
|
|
|
2017-08-23 16:01:00 +02:00
|
|
|
%ifarch %{tsan_arch}
|
|
|
|
# boo#1052528
|
|
|
|
%package race
|
|
|
|
Summary: Go runtime race detector
|
|
|
|
License: NCSA or MIT
|
2023-04-29 01:29:50 +02:00
|
|
|
Group: Development/Languages/Go
|
2017-08-23 16:01:00 +02:00
|
|
|
Url: https://compiler-rt.llvm.org/
|
|
|
|
Requires: go = %{version}
|
2018-02-27 13:39:23 +01:00
|
|
|
Supplements: go = %{version}
|
2017-08-23 16:01:00 +02:00
|
|
|
ExclusiveArch: %{tsan_arch}
|
2022-02-01 23:26:51 +01:00
|
|
|
# We provide this for RH/Fedora compatibility
|
|
|
|
Provides: golang-race = %{version}
|
2020-07-16 08:49:50 +02:00
|
|
|
# Make this both Requires and BuildRequires go1.x-race so that we get build
|
|
|
|
# errors if it is missing.
|
|
|
|
BuildRequires: go%{api_version}-race
|
|
|
|
Requires: go%{api_version}-race
|
2017-08-23 16:01:00 +02:00
|
|
|
|
|
|
|
%description race
|
|
|
|
Go runtime race detector libraries. Install this package if you wish to use the
|
|
|
|
-race option, in order to detect race conditions present in your Go programs.
|
|
|
|
%endif
|
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%prep
|
2011-10-06 13:06:36 +02:00
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%build
|
2017-08-23 16:01:00 +02:00
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%install
|
2017-12-22 10:22:22 +01:00
|
|
|
install -D -m 0644 %{S:0} %{buildroot}/usr/share/doc/packages/go/README
|
|
|
|
install -D -m 0644 %{S:0} %{buildroot}/usr/share/doc/packages/go-doc/README
|
|
|
|
%ifarch %{tsan_arch}
|
|
|
|
install -D -m 0644 %{S:0} %{buildroot}/usr/share/doc/packages/go-race/README
|
2017-05-24 13:06:00 +02:00
|
|
|
%endif
|
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2017-12-22 10:22:22 +01:00
|
|
|
%doc /usr/share/doc/packages/go/
|
2017-08-23 16:01:00 +02:00
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
2017-12-22 10:22:22 +01:00
|
|
|
%doc /usr/share/doc/packages/go-doc/
|
2010-10-08 16:25:58 +02:00
|
|
|
|
2017-08-23 16:01:00 +02:00
|
|
|
%ifarch %{tsan_arch}
|
|
|
|
%files race
|
2017-12-22 10:22:22 +01:00
|
|
|
%doc /usr/share/doc/packages/go-race/
|
2017-08-23 16:01:00 +02:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%endif
|
|
|
|
|
2010-10-08 16:25:58 +02:00
|
|
|
%changelog
|