Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Last active October 10, 2015 17:48
Show Gist options
  • Save rcrowley/3728417 to your computer and use it in GitHub Desktop.
Save rcrowley/3728417 to your computer and use it in GitHub Desktop.
Go binary distribution Debian packaging
VERSION="1.4.2"
BUILD="slack1"
set -e -x
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -O "https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz"
tar xf "go$VERSION.linux-amd64.tar.gz"
fakeroot fpm -m "Richard Crowley <rcrowley@slack-corp.com>" \
-n "go" -v "$VERSION-$BUILD" \
-p "$OLDPWD/go_${VERSION}-${BUILD}_amd64.deb" \
--prefix "/usr" \
-s "dir" -t "deb" "go"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment