summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--development/google-go-lang/README13
-rw-r--r--development/google-go-lang/doinst.sh15
-rw-r--r--development/google-go-lang/go.csh3
-rw-r--r--development/google-go-lang/go.sh3
-rw-r--r--development/google-go-lang/google-go-lang.SlackBuild77
-rw-r--r--development/google-go-lang/google-go-lang.info10
-rw-r--r--development/google-go-lang/slack-desc19
7 files changed, 140 insertions, 0 deletions
diff --git a/development/google-go-lang/README b/development/google-go-lang/README
new file mode 100644
index 0000000000..c7fbad4411
--- /dev/null
+++ b/development/google-go-lang/README
@@ -0,0 +1,13 @@
+The Go programming language is an open source project to make programmers more
+productive. 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.
+
+The tools are added to the path by putting go.sh and go.csh files in
+/etc/profile.d and letting the system's /etc/profile or /etc/csh.login pick it
+up. If you want to add any of Go's environment variables you can add them
+there. \ No newline at end of file
diff --git a/development/google-go-lang/doinst.sh b/development/google-go-lang/doinst.sh
new file mode 100644
index 0000000000..87208016c0
--- /dev/null
+++ b/development/google-go-lang/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/profile.d/go.csh.new
+config etc/profile.d/go.sh.new
diff --git a/development/google-go-lang/go.csh b/development/google-go-lang/go.csh
new file mode 100644
index 0000000000..ee50666deb
--- /dev/null
+++ b/development/google-go-lang/go.csh
@@ -0,0 +1,3 @@
+#!/bin/csh
+setenv GOROOT /opt/google/go
+setenv PATH ${PATH}:${GOROOT}/bin \ No newline at end of file
diff --git a/development/google-go-lang/go.sh b/development/google-go-lang/go.sh
new file mode 100644
index 0000000000..0bc8f66f6f
--- /dev/null
+++ b/development/google-go-lang/go.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+export GOROOT=/opt/google/go
+export PATH="${PATH}:${GOROOT}/bin" \ No newline at end of file
diff --git a/development/google-go-lang/google-go-lang.SlackBuild b/development/google-go-lang/google-go-lang.SlackBuild
new file mode 100644
index 0000000000..eee2dc9ad0
--- /dev/null
+++ b/development/google-go-lang/google-go-lang.SlackBuild
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# Slackware build script for google-go-lang
+
+# Written by Eric Schultz eric at schultzter.ca
+
+# Copyright (c) 2012 Eric Schultz
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+PRGNAM=google-go-lang
+VERSION=${VERSION:-1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+RELEASE=${RELEASE:-linux}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486; GARCH=386 ;;
+ x86_64) ARCH=x86_64; GARCH=amd64 ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/opt/google $OUTPUT
+cd $PKG/opt/google
+tar -axf $CWD/go.go$VERSION.$RELEASE-$GARCH.tar.gz
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Put the profile scripts for setting PATH and env variables
+mkdir -p $PKG/etc/profile.d
+install -m0755 -oroot $CWD/go.csh $PKG/etc/profile.d/go.csh.new
+install -m0755 -oroot $CWD/go.sh $PKG/etc/profile.d/go.sh.new
+
+cd go
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS LICENSE PATENTS README VERSION \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/google-go-lang/google-go-lang.info b/development/google-go-lang/google-go-lang.info
new file mode 100644
index 0000000000..08c01e951d
--- /dev/null
+++ b/development/google-go-lang/google-go-lang.info
@@ -0,0 +1,10 @@
+PRGNAM="google-go-lang"
+VERSION="1"
+HOMEPAGE="http://golang.org"
+DOWNLOAD="http://go.googlecode.com/files/go.go1.linux-386.tar.gz"
+MD5SUM="a231e69819c85383627d9e47fcff43bf"
+DOWNLOAD_x86_64="http://go.googlecode.com/files/go.go1.linux-amd64.tar.gz"
+MD5SUM_x86_64="64b87563d051007117c854b8eb383230"
+MAINTAINER="Eric Schultz"
+EMAIL="eric at schultzter dot ca"
+APPROVED="dsomero"
diff --git a/development/google-go-lang/slack-desc b/development/google-go-lang/slack-desc
new file mode 100644
index 0000000000..9cf0880b9f
--- /dev/null
+++ b/development/google-go-lang/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+google-go-lang: google-go-lang (Google's Go Language kit with gc tool chain)
+google-go-lang:
+google-go-lang: The Go programming language is an open source project to make
+google-go-lang: programmers more productive. Go is expressive, concise, clean, and
+google-go-lang: efficient. Its concurrency mechanisms make it easy to write programs
+google-go-lang: that get the most out of multicore and networked machines, while its
+google-go-lang: novel type system enables flexible and modular program construction.
+google-go-lang:
+google-go-lang:
+google-go-lang:
+google-go-lang: