%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%bcond_with bootstrap
%global provider github
%global provider_tld com
%global project golang
%global repo net
# https://github.com/golang/net
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path golang.org/x/net
%global commit ab34263943818b32f575efc978a3d24e80b04bd7
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: golang-x-net
Version: 0
Release: 0.59.20200807git%{shortcommit}%{?dist}.1
Summary: Go supplementary network libraries
# Upstream license specification: BSD-3-Clause
License: BSD
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{commit}.tar.gz
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
BuildRequires: golang(golang.org/x/sys/unix)
%if %{without bootstrap}
BuildRequires: golang(golang.org/x/text/encoding)
BuildRequires: golang(golang.org/x/text/encoding/charmap)
BuildRequires: golang(golang.org/x/text/encoding/htmlindex)
BuildRequires: golang(golang.org/x/text/secure/bidirule)
BuildRequires: golang(golang.org/x/text/transform)
BuildRequires: golang(golang.org/x/text/unicode/bidi)
BuildRequires: golang(golang.org/x/text/unicode/norm)
%endif
%description
This package holds supplementary Go networking libraries.
%package devel
Summary: %{summary}
BuildArch: noarch
Provides: golang(%{import_path}/bpf) = %{version}-%{release}
Provides: golang(%{import_path}/context) = %{version}-%{release}
Provides: golang(%{import_path}/context/ctxhttp) = %{version}-%{release}
Provides: golang(%{import_path}/dict) = %{version}-%{release}
Provides: golang(%{import_path}/dns/dnsmessage) = %{version}-%{release}
Provides: golang(%{import_path}/html) = %{version}-%{release}
Provides: golang(%{import_path}/html/atom) = %{version}-%{release}
%if %{without bootstrap}
Provides: golang(%{import_path}/html/charset) = %{version}-%{release}
Provides: golang(%{import_path}/http/httpguts) = %{version}-%{release}
Provides: golang(%{import_path}/http/httpproxy) = %{version}-%{release}
Provides: golang(%{import_path}/http2) = %{version}-%{release}
Provides: golang(%{import_path}/http2/h2c) = %{version}-%{release}
Provides: golang(%{import_path}/http2/hpack) = %{version}-%{release}
%endif
Provides: golang(%{import_path}/icmp) = %{version}-%{release}
%if %{without bootstrap}
Provides: golang(%{import_path}/idna) = %{version}-%{release}
%endif
Provides: golang(%{import_path}/ipv4) = %{version}-%{release}
Provides: golang(%{import_path}/ipv6) = %{version}-%{release}
Provides: golang(%{import_path}/nettest) = %{version}-%{release}
Provides: golang(%{import_path}/netutil) = %{version}-%{release}
Provides: golang(%{import_path}/proxy) = %{version}-%{release}
%if %{without bootstrap}
Provides: golang(%{import_path}/publicsuffix) = %{version}-%{release}
%endif
Provides: golang(%{import_path}/trace) = %{version}-%{release}
Provides: golang(%{import_path}/webdav) = %{version}-%{release}
Provides: golang(%{import_path}/websocket) = %{version}-%{release}
Provides: golang(%{import_path}/xsrftoken) = %{version}-%{release}
Provides: golang-ipath(golang.org/x/net) = %{version}-%{release}
%description devel
%{summary}
This package contains library source intended for
building other packages which use import path with
%{import_path} prefix.
%prep
%setup -q -n %{repo}-%{commit}
%if %{without bootstrap}
rm -rf http/ http2/ html/charset/ idna/ publicsuffix/
%endif
%build
%install
# source codes for building projects
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
# find all *.s and generate devel.file-list
for file in $(find . -iname "*.s") ; do
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
done
# find all *.c and generate devel.file-list
for file in $(find . -iname "*.c") ; do
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
done
# find all *.go but no *_test.go files and generate devel.file-list
for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
done
sort -u -o devel.file-list devel.file-list
%files devel -f devel.file-list
%license LICENSE PATENTS
%doc AUTHORS CONTRIBUTING.md CONTRIBUTORS README.md
%changelog
* Thu Jan 7 18:47:11 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-12.20180628git2972be2.1
- Build for EPEL8
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Apr 23 10:40:13 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-9.20180628git2972be2
- Update to new macros
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-8.git2972be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Oct 23 2018 Nicolas Mailhot <nim@fedoraproject.org> - 1.4-7.git2972be2
- redhat-rpm-config-123 triggers bugs in gosetup, remove it from Go spec files as it’s just an alias
- https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/RWD5YATAYAFWKIDZBB7EB6N5DAO4ZKFM/
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-6.git2972be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 28 2018 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-5.20180628git2972be2
- Bump to commit 2972be24d48e78746da79ba8e24e8b488c9880de
* Mon Apr 09 2018 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-4.20180409gitf6d7a1f
- Upstream GIT revision f6d7a1f
* Fri Mar 09 2018 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-3
- Update with the new Go packaging
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Sep 29 2017 Robert-André Mauchin <zebob.m@gmail.com> - 1.4-1
- First package for Fedora