From e79cf781d2cc00bade01d20869b32ba7a40df37c Mon Sep 17 00:00:00 2001 From: milisarge Date: Mon, 24 Apr 2017 03:45:52 +0300 Subject: [PATCH] go.paketlendi --- talimatname/genel/go/go-ortam.sh | 5 ---- talimatname/genel/go/go.kur-kos.sh | 3 --- talimatname/genel/go/talimat | 42 +++++++++++++++++++++--------- 3 files changed, 30 insertions(+), 20 deletions(-) delete mode 100644 talimatname/genel/go/go-ortam.sh delete mode 100755 talimatname/genel/go/go.kur-kos.sh diff --git a/talimatname/genel/go/go-ortam.sh b/talimatname/genel/go/go-ortam.sh deleted file mode 100644 index 80123934b..000000000 --- a/talimatname/genel/go/go-ortam.sh +++ /dev/null @@ -1,5 +0,0 @@ -kuryer=/opt -export GOPATH=/root/go/ -export GOROOT=$kuryer/go/ -export GOBIN=$kuryer/go/bin/ -export PATH=$PATH:/$kuryer/go/bin/ diff --git a/talimatname/genel/go/go.kur-kos.sh b/talimatname/genel/go/go.kur-kos.sh deleted file mode 100755 index 56e5816a0..000000000 --- a/talimatname/genel/go/go.kur-kos.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -mkdir -p /$HOME/go - diff --git a/talimatname/genel/go/talimat b/talimatname/genel/go/talimat index c24c0dd26..e3c849955 100644 --- a/talimatname/genel/go/talimat +++ b/talimatname/genel/go/talimat @@ -1,21 +1,39 @@ # Description: GO Programlama dili # URL: http://golang.org/ -# packager: milisarge@gmail.com -# Depends on: git mercurial +# Packager: milisarge@gmail.com +# Depends on: name=go -version=1.4.3 +version=1.8.1 release=1 +source=(https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz + https://storage.googleapis.com/golang/${name}${version}.src.tar.gz) -case "`uname -m`" in - x86_64) GOARCH=amd64 ;; - i686) GOARCH=386 ;; -esac - -source=(https://storage.googleapis.com/golang/${name}${version}.linux-$GOARCH.tar.gz) build() { - mkdir $PKG/opt - cp -rf $name $PKG/opt/ - + + install -d $SRC/go1.4 + bsdtar -xf $PKGMK_SOURCE_DIR/${name}1.4.3.linux-amd64.tar.gz -C $SRC/go1.4 --strip-components 1 + bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz -C $SRC + + export GOROOT_BOOTSTRAP=${SRC}/go1.4 + export GOROOT_FINAL=/usr/lib/go + export GOOS=linux + export GOARCH=amd64 + + patch -p0 -i $SRC/$name-certpath.diff + + cd go/src + bash make.bash --no-clean + + install -d $PKG/usr/lib + cp -r $SRC/go $PKG/usr/lib/ + + install -d $PKG/usr/bin + ln -s /usr/lib/go/bin/go $PKG/usr/bin/ + ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/ + + find $PKG \( -name "*.a" -o -name "*.go" \) -exec chmod 644 '{}' \; + find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete + rm $PKG/usr/lib/go/src/*.bat }