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

Small updates
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Dec 01 18:32:50 2018 +0200 (2018-12-01)
parents d5aab818505e
children 32129884a108
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@20882 10 REPOLOGY="go"
al@20383 11
al@20777 12 case $ARCH in
al@20777 13 i?86) TARBALL="go$VERSION.linux-386.tar.gz";;
al@20777 14 x86_64) TARBALL="go$VERSION.linux-amd64.tar.gz";;
al@20777 15 esac
al@20777 16 WGET_URL="https://dl.google.com/go/$TARBALL"
al@20383 17
al@21054 18 COOKOPTS="!strip !zip !pngz" # stripping an *.a archives producing errors;
al@20777 19 # *.zip archives have weird content and fail to recompress
al@20383 20
al@20383 21 compile_rules() {
al@20777 22 mkdir -p $install/usr/lib/go/
al@20383 23 cp -a $src/* $install/usr/lib/go/
al@20777 24 rm -rf $install/usr/lib/go/blog/ # blog?!
al@20383 25 }
al@20383 26
al@20383 27 genpkg_rules() {
al@20383 28 cp -a $install/* $fs
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 }