2024-01-05 23:18:56 +01:00
|
|
|
%define with_pie 1
|
2024-01-05 23:18:56 +01:00
|
|
|
Name: go
|
2024-01-05 23:18:56 +01:00
|
|
|
Version: 1.13.1
|
2024-01-05 23:18:56 +01:00
|
|
|
Release: 1mamba
|
2024-01-05 23:18:56 +01:00
|
|
|
Summary: The Go programming language
|
|
|
|
Group: Applications/Development
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://golang.org
|
|
|
|
## GITSOURCE https://github.com/golang/go.git go1.10.1
|
|
|
|
Source: https://github.com/golang/go.git/go%{version}/go-%{version}.tar.bz2
|
|
|
|
Patch0: go-1.10.1-default-buildmode-pie.patch
|
|
|
|
License: BSD
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 23:18:56 +01:00
|
|
|
BuildRequires: gcc-go >= 8.1.0
|
2024-01-05 23:18:56 +01:00
|
|
|
Provides: go
|
2024-01-05 23:18:56 +01:00
|
|
|
Provides: go-pie
|
|
|
|
#%if "%{with_pie}" == "1"
|
|
|
|
#Conflicts: go
|
|
|
|
#%else
|
|
|
|
#Conflicts: go-pie
|
|
|
|
#%endif
|
2024-01-05 23:18:56 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Go programming language.
|
|
|
|
|
|
|
|
%package pie
|
|
|
|
Group: Applications/Development
|
|
|
|
Summary: The Go programming language (with PIE enabled by default)
|
|
|
|
|
|
|
|
%description pie
|
|
|
|
The Go programming language (with PIE enabled by default).
|
|
|
|
|
|
|
|
%debug_package
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%if "%{with_pie}" == "1"
|
|
|
|
%patch0 -p1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%define _use_internal_dependency_generator 0
|
|
|
|
|
|
|
|
%define __find_provides %{_builddir}/go-%{version}/find_provides.sh
|
|
|
|
cat > %{_builddir}/go-%{version}/find_provides.sh <<_EOF
|
|
|
|
#! /bin/sh
|
|
|
|
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu}
|
|
|
|
_EOF
|
|
|
|
chmod +x %{_builddir}/go-%{version}/find_provides.sh
|
|
|
|
|
|
|
|
%define __find_requires %{_builddir}/go-%{version}/find_requires.sh
|
|
|
|
cat > %{_builddir}/go-%{version}/find_requires.sh <<_EOF
|
|
|
|
#! /bin/sh
|
|
|
|
grep -v %{buildroot}%{_libdir}/go/src/ | \
|
|
|
|
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null
|
|
|
|
_EOF
|
|
|
|
chmod +x %{_builddir}/go-%{version}/find_requires.sh
|
|
|
|
|
|
|
|
%build
|
|
|
|
export GOPATH="`pwd`/"
|
|
|
|
|
|
|
|
export GOROOT="$GOPATH"
|
|
|
|
export GOBIN="$GOROOT/bin"
|
|
|
|
|
|
|
|
cd "$GOPATH/src"
|
|
|
|
./make.bash --no-clean -v
|
|
|
|
|
|
|
|
PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
|
|
|
|
%ifarch x86_64
|
|
|
|
PATH="$GOBIN:$PATH" go install -v -race std
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
export GOPATH="`pwd`/"
|
|
|
|
options=(!strip staticlibs)
|
|
|
|
|
|
|
|
install -d %{buildroot}{%{_bindir},%{_libdir}/go,%{_docdir}/go}
|
|
|
|
|
|
|
|
cp -a bin pkg src lib misc %{buildroot}%{_libdir}/go
|
|
|
|
cp -r doc/* %{buildroot}%{_docdir}/go
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
ln -sf %{_libdir}/go/bin/go %{buildroot}%{_bindir}/go-pie
|
|
|
|
ln -sf %{_libdir}/go/bin/gofmt %{buildroot}%{_bindir}/gofmt-pie
|
2024-01-05 23:18:56 +01:00
|
|
|
ln -sf %{_docdir}/go %{buildroot}%{_libdir}/go/doc
|
|
|
|
|
|
|
|
install -Dm644 LICENSE %{buildroot}%{_datadir}/licenses/go/LICENSE
|
|
|
|
install -Dm644 VERSION %{buildroot}%{_libdir}/go/VERSION
|
|
|
|
|
|
|
|
rm -rf %{buildroot}%{_libdir}/go/pkg/bootstrap
|
|
|
|
rm -rf %{buildroot}%{_libdir}/go/pkg/tool/*/api
|
|
|
|
rm -rf %{buildroot}%{_libdir}/go/src/*.rc
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%if "%{with_pie}" == "1"
|
|
|
|
%files pie
|
|
|
|
%else
|
|
|
|
%files
|
|
|
|
%endif
|
|
|
|
%defattr(-,root,root)
|
2024-01-05 23:18:56 +01:00
|
|
|
%{_bindir}/go-pie
|
|
|
|
%{_bindir}/gofmt-pie
|
2024-01-05 23:18:56 +01:00
|
|
|
%dir %{_libdir}/go
|
|
|
|
%{_libdir}/go/*
|
|
|
|
%dir %{_datadir}/doc/go
|
|
|
|
%{_datadir}/doc/go/*
|
|
|
|
%{_datadir}/licenses/go/LICENSE
|
|
|
|
#%doc README.md
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 23:18:56 +01:00
|
|
|
* Thu Oct 03 2019 Automatic Build System <autodist@mambasoft.it> 1.13.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Wed Sep 11 2019 Automatic Build System <autodist@mambasoft.it> 1.13-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Mon Jan 28 2019 Automatic Build System <autodist@mambasoft.it> 1.11.5-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Sat Dec 22 2018 Automatic Build System <autodist@mambasoft.it> 1.11.4-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Fri Dec 14 2018 Automatic Build System <autodist@mambasoft.it> 1.11.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Mon Nov 05 2018 Automatic Build System <autodist@mambasoft.it> 1.11.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Sat Oct 06 2018 Automatic Build System <autodist@mambasoft.it> 1.11.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Mon Sep 10 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.11-2mamba
|
|
|
|
- rename go and go-fmt to [-pie] for cohexistence woth gcc-go
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Tue Sep 04 2018 Automatic Build System <autodist@mambasoft.it> 1.11-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Sun Jun 24 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.3-2mamba
|
|
|
|
- rebuilt with libgo 8.1.0
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Fri Jun 08 2018 Automatic Build System <autodist@mambasoft.it> 1.10.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Wed May 02 2018 Automatic Build System <autodist@mambasoft.it> 1.10.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:18:56 +01:00
|
|
|
* Tue Apr 24 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.1-2mamba
|
|
|
|
- remove testdata binaries for other architectures
|
|
|
|
|
|
|
|
* Thu Apr 19 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.1-1mamba
|
|
|
|
- package created using the webbuild interface
|