wok-next annotate go-bin/receipt @ rev 20778

git update: 2.16.2 (Feb-2018) -> 2.17.1 (May-2018)
author Erkan Yilmaz <erkan@slitaz.org>
date Fri Jun 08 09:36:49 2018 +0000 (2018-06-08)
parents 8164c0612ccf
children d958fec46c9f
rev   line source
al@20383 1 # SliTaz package receipt v2.
al@20383 2
al@20383 3 PACKAGE="go-bin"
al@20777 4 VERSION="1.10.2"
al@20383 5 CATEGORY="development"
al@20383 6 SHORT_DESC="The Go programming language, binary distribution"
al@20383 7 MAINTAINER="al.bobylev@gmail.com"
al@20383 8 LICENSE="BSD"
al@20777 9 WEB_SITE="https://golang.org/"
al@20383 10
al@20777 11 case $ARCH in
al@20777 12 i?86) TARBALL="go$VERSION.linux-386.tar.gz";;
al@20777 13 x86_64) TARBALL="go$VERSION.linux-amd64.tar.gz";;
al@20777 14 esac
al@20777 15 WGET_URL="https://dl.google.com/go/$TARBALL"
al@20383 16
al@20777 17 COOKOPTS="!strip !zip" # stripping an *.a archives producing errors;
al@20777 18 # *.zip archives have weird content and fail to recompress
al@20383 19
al@20383 20 compile_rules() {
al@20777 21 mkdir -p $install/usr/lib/go/
al@20383 22 cp -a $src/* $install/usr/lib/go/
al@20777 23 rm -rf $install/usr/lib/go/blog/ # blog?!
al@20383 24 }
al@20383 25
al@20383 26 genpkg_rules() {
al@20383 27 cp -a $install/* $fs
al@20383 28 DEPENDS=""
al@20383 29 PROVIDE="go"
al@20383 30 TAGS="go"
al@20383 31 }
al@20383 32
al@20383 33 post_install_go_bin() {
al@20383 34 chroot "$1/" sed -i "/^PATH=/ s|\"$|:/usr/lib/go/bin\"|" /etc/profile
al@20383 35 [ -n "$1"] || . /etc/profile
al@20383 36 }
al@20383 37
al@20383 38 post_remove_go_bin() {
al@20383 39 chroot "$1/" sed -i "/^PATH=/ s|:/usr/lib/go/bin||" /etc/profile
al@20383 40 [ -n "$1"] || . /etc/profile
al@20383 41 }