2 changed files with 161 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||||||
|
Index: src/crypto/x509/root_unix.go
|
||||||
|
--- src/crypto/x509/root_unix.go.orig 2017-09-01 11:28:19.812411000 +0200
|
||||||
|
+++ src/crypto/x509/root_unix.go 2017-09-01 11:57:34.508298000 +0200
|
||||||
|
@@ -14,11 +14,7 @@
|
||||||
|
// Possible directories with certificate files; stop after successfully
|
||||||
|
// reading at least one file from a directory.
|
||||||
|
var certDirectories = []string{
|
||||||
|
- "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139
|
||||||
|
- "/system/etc/security/cacerts", // Android
|
||||||
|
- "/usr/local/share/certs", // FreeBSD
|
||||||
|
- "/etc/pki/tls/certs", // Fedora/RHEL
|
||||||
|
- "/etc/openssl/certs", // NetBSD
|
||||||
|
+ "@l_prefix@/etc/x509",
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
@ -0,0 +1,145 @@ |
|||||||
|
## |
||||||
|
## go19.spec -- OpenPKG RPM Package Specification |
||||||
|
## Copyright (c) 2000-2018 OpenPKG Project <http://openpkg.org/> |
||||||
|
## |
||||||
|
## Permission to use, copy, modify, and distribute this software for |
||||||
|
## any purpose with or without fee is hereby granted, provided that |
||||||
|
## the above copyright notice and this permission notice appear in all |
||||||
|
## copies. |
||||||
|
## |
||||||
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
||||||
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||||||
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||||||
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
||||||
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||||
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||||
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
||||||
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||||||
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||||||
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
||||||
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
||||||
|
## SUCH DAMAGE. |
||||||
|
## |
||||||
|
|
||||||
|
# package information |
||||||
|
Name: go19 |
||||||
|
Summary: The Go Programming Language (version 1.9) |
||||||
|
URL: http://golang.org/ |
||||||
|
Vendor: Robert Griesemer, Rob Pike, Ken Thompson |
||||||
|
Packager: OpenPKG Project |
||||||
|
Distribution: OpenPKG Community |
||||||
|
Class: PLUS |
||||||
|
Group: Language |
||||||
|
License: BSD |
||||||
|
Version: 1.9.4 |
||||||
|
Release: 20180218 |
||||||
|
|
||||||
|
# list of sources |
||||||
|
Source0: http://golang.org/dl/go%{version}.src.tar.gz |
||||||
|
Patch0: go19.patch |
||||||
|
|
||||||
|
# build information |
||||||
|
BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, make, bison, flex |
||||||
|
PreReq: OpenPKG, openpkg >= 20160101, gcc, x509 |
||||||
|
BuildPreReq: go-cc |
||||||
|
PreReq: go-cc |
||||||
|
|
||||||
|
%description |
||||||
|
Go is a concurrent garbage-collected system programming language, |
||||||
|
designed 2007 by Robert Griesemer, Rob Pike and Ken Thompson at |
||||||
|
Google. Go is expressive, concise, clean, and efficient. Its |
||||||
|
concurrency mechanisms make it easy to write programs that get |
||||||
|
the most out of multicore and networked machines, while its novel |
||||||
|
type system enables flexible and modular program construction. Go |
||||||
|
compiles quickly to machine code yet has the convenience of garbage |
||||||
|
collection and the power of run-time reflection. It's a fast, |
||||||
|
statically typed, compiled language that feels like a dynamically |
||||||
|
typed, interpreted language. |
||||||
|
|
||||||
|
%track |
||||||
|
prog go = { |
||||||
|
version = %{version} |
||||||
|
url = http://golang.org/dl/ |
||||||
|
regex = go(1.9(?:\.\d+)?)\.src\.tar\.gz |
||||||
|
} |
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q -n go |
||||||
|
%patch -p0 |
||||||
|
|
||||||
|
%build |
||||||
|
# patch the patch |
||||||
|
%{l_shtool} subst %{l_value -s -a} \ |
||||||
|
src/crypto/x509/root_unix.go |
||||||
|
|
||||||
|
# configure package |
||||||
|
export GOROOT="`pwd`" |
||||||
|
export GOBIN="`pwd`/bin" |
||||||
|
export GOROOT_FINAL="%{l_prefix}/lib/go19" |
||||||
|
if [ -x %{l_prefix}/lib/go/bin/go ]; then |
||||||
|
export GOROOT_BOOTSTRAP="%{l_prefix}/lib/go" |
||||||
|
elif [ -x %{l_prefix}/lib/go-bootstrap/bin/go ]; then |
||||||
|
export GOROOT_BOOTSTRAP="%{l_prefix}/lib/go-bootstrap" |
||||||
|
else |
||||||
|
( echo "ATTENTION! Because Go version 1.5 and higher is written in Go itself" |
||||||
|
echo "you either need an already (older) installed \"go\" package or you have" |
||||||
|
echo "to install at least once the \"go-bootstap\" package for bootstrapping." |
||||||
|
) | %{l_rpmtool} msg -b -t error |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
export GOOS="" |
||||||
|
export GOARCH="" |
||||||
|
case "%{l_platform -t}" in |
||||||
|
*-freebsd* ) GOOS="freebsd" ;; |
||||||
|
*-linux* ) GOOS="linux" ;; |
||||||
|
*-macosx* ) GOOS="darwin" ;; |
||||||
|
esac |
||||||
|
case "%{l_platform -t}" in |
||||||
|
ix86-* ) GOARCH="386" ;; |
||||||
|
amd64-* ) GOARCH="amd64" ;; |
||||||
|
esac |
||||||
|
if [ ".$GOOS" = . -o ".$GOARCH" = . ]; then |
||||||
|
echo "ERROR: platform not supported" 1>&2 |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
# provide the dedicated C/C++ compiler wrappers |
||||||
|
# (which is also available later for Go to compile) |
||||||
|
export CC="%{l_prefix}/bin/go-cc" |
||||||
|
export CXX="%{l_prefix}/bin/go-c++" |
||||||
|
|
||||||
|
# build program |
||||||
|
%{l_shtool} mkdir -f -p -m 755 $GOBIN |
||||||
|
cd src |
||||||
|
%{l_bash} make.bash |
||||||
|
|
||||||
|
%install |
||||||
|
# cleanup source tree |
||||||
|
rm -rf bin-tmp |
||||||
|
rm -f favicon.ico |
||||||
|
rm -rf [A-R]* doc misc test |
||||||
|
|
||||||
|
# create installation hierarchy |
||||||
|
%{l_shtool} mkdir -f -p -m 755 \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/go19 |
||||||
|
|
||||||
|
# install program |
||||||
|
cp -rp * $RPM_BUILD_ROOT%{l_prefix}/lib/go19/ |
||||||
|
|
||||||
|
# install wrapper executables |
||||||
|
for prg in go gofmt; do |
||||||
|
( echo "#!/bin/sh" |
||||||
|
echo "exec %{l_prefix}/lib/go19/bin/$prg \${1+\"\$@\"}" |
||||||
|
) >$prg |
||||||
|
%{l_shtool} install -c -m 755 \ |
||||||
|
$prg $RPM_BUILD_ROOT%{l_prefix}/bin/${prg}19 |
||||||
|
done |
||||||
|
|
||||||
|
# determine installation files |
||||||
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
||||||
|
|
||||||
|
%files -f files |
||||||
|
|
||||||
|
%clean |
||||||
|
|
||||||
Loading…
Reference in new issue