wok-next rev 20383

Add 'go-bin' to bootstrap 'go'; tiny edits in 'go' (still broken).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Nov 30 02:32:01 2017 +0200 (2017-11-30)
parents 1356ce339cbf
children db12822e1407
files go-bin/receipt go/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/go-bin/receipt	Thu Nov 30 02:32:01 2017 +0200
     1.3 @@ -0,0 +1,37 @@
     1.4 +# SliTaz package receipt v2.
     1.5 +
     1.6 +PACKAGE="go-bin"
     1.7 +VERSION="1.9.2"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="The Go programming language, binary distribution"
    1.10 +MAINTAINER="al.bobylev@gmail.com"
    1.11 +LICENSE="BSD"
    1.12 +WEB_SITE="http://golang.org/"
    1.13 +
    1.14 +TARBALL="go$VERSION.linux-386.tar.gz"
    1.15 +WGET_URL="https://redirector.gvt1.com/edgedl/go/$TARBALL"
    1.16 +
    1.17 +COOKOPTS="!strip"	# stripping an *.a archives producing errors
    1.18 +
    1.19 +compile_rules() {
    1.20 +	mkdir -p $install/usr/lib/go/
    1.21 +	cp -a $src/* $install/usr/lib/go/
    1.22 +	rm -rf $install/usr/lib/go/blog/	# blog?!
    1.23 +}
    1.24 +
    1.25 +genpkg_rules() {
    1.26 +	cp -a $install/* $fs
    1.27 +	DEPENDS=""
    1.28 +	PROVIDE="go"
    1.29 +	TAGS="go"
    1.30 +}
    1.31 +
    1.32 +post_install_go_bin() {
    1.33 +	chroot "$1/" sed -i "/^PATH=/ s|\"$|:/usr/lib/go/bin\"|" /etc/profile
    1.34 +	[ -n "$1"] || .  /etc/profile
    1.35 +}
    1.36 +
    1.37 +post_remove_go_bin() {
    1.38 +	chroot "$1/" sed -i "/^PATH=/ s|:/usr/lib/go/bin||" /etc/profile
    1.39 +	[ -n "$1"] || .  /etc/profile
    1.40 +}
     2.1 --- a/go/receipt	Wed Nov 29 18:01:14 2017 +0100
     2.2 +++ b/go/receipt	Thu Nov 30 02:32:01 2017 +0200
     2.3 @@ -1,21 +1,20 @@
     2.4  # SliTaz package receipt v2.
     2.5  
     2.6  PACKAGE="go"
     2.7 -VERSION="1.2.1"
     2.8 +VERSION="1.9.2"
     2.9  CATEGORY="development"
    2.10 -SHORT_DESC="The Go programming language (R.Griesemer R.Pike K.Thompson)"
    2.11 +SHORT_DESC="The Go programming language"
    2.12  MAINTAINER="domcox@slitaz.org"
    2.13  LICENSE="BSD"
    2.14 -WEB_SITE="http://www.golang.org"
    2.15 -TARBALL="$PACKAGE$VERSION.src.tar.gz"
    2.16 -WGET_URL="https://go.googlecode.com/files/$TARBALL"
    2.17 +WEB_SITE="http://golang.org/"
    2.18  
    2.19 -BUILD_DEPENDS="bash bison make ed wget"
    2.20 -SPLIT="go emacs-pkg-go-mode go-sources"
    2.21 +TARBALL="$PACKAGE$VERSION.tar.gz"
    2.22 +WGET_URL="https://go.googlesource.com/go/+archive/$TARBALL"
    2.23  
    2.24 -# Rules to configure and make the package.
    2.25 -compile_rules()
    2.26 -{
    2.27 +BUILD_DEPENDS="go-bin bash bison make ed"
    2.28 +SPLIT="go-sources emacs-pkg-go-mode go"
    2.29 +
    2.30 +compile_rules() {
    2.31  	cd $src/src
    2.32  
    2.33  	# Setting up environnment before building go.
    2.34 @@ -23,6 +22,7 @@
    2.35  
    2.36  	# Go tree, binaries and scripts locations.
    2.37  	export GOROOT_FINAL=/usr/lib/go
    2.38 +	export GOROOT_BOOTSTRAP=/usr/lib/go
    2.39  
    2.40  	# Support all x86 chips (Pentium MMX or later)
    2.41  	# or optionaly only Pentium 4/Opteron/Athlon 64 or later.
    2.42 @@ -39,11 +39,9 @@
    2.43  			# (registerizer) and generates good code (although gccgo can do
    2.44  			# noticeably better sometimes).
    2.45  			export GOARCH="amd64" ;;
    2.46 -
    2.47  		i486)
    2.48  			# Comparable to the amd64
    2.49  			export GOARCH="386" ;;
    2.50 -
    2.51  		arm)
    2.52  			# Supports Linux, FreeBSD and NetBSD binaries. Less widely used
    2.53  			# than the other ports.
    2.54 @@ -53,74 +51,74 @@
    2.55  	esac
    2.56  
    2.57  	# Build go
    2.58 -	/bin/bash make.bash --no-banner
    2.59 +	/bin/bash make.bash --no-clean || return 1
    2.60 +
    2.61 +	# Installation
    2.62 +	mkdir -p $install$GOROOT_FINAL/src
    2.63 +	# bin
    2.64 +	cp -a $src/bin $install/usr
    2.65 +	# go tree
    2.66 +	cp -a $src/pkg $install$GOROOT_FINAL
    2.67 +	# lib
    2.68 +	cp -a $src/lib $install$GOROOT_FINAL
    2.69 +	# include
    2.70 +	cp -a $src/include $install$GOROOT_FINAL
    2.71 +	# pkg
    2.72 +	cp -a $src/src/pkg  $install$GOROOT_FINAL/src
    2.73 +	cp -a $src/src/cmd  $install$GOROOT_FINAL/src
    2.74 +	cp -a $src/src/lib9 $install$GOROOT_FINAL/src
    2.75 +
    2.76 +	mkdir -p $install/usr/share/emacs/site-lisp/site-start.d
    2.77 +	cp -a $stuff/80-go-init.el $install/usr/share/emacs/site-lisp/site-start.d
    2.78 +	mkdir -p $install/usr/share/emacs/site-lisp/go-mode
    2.79 +	cp -a $src/misc/emacs/* $install/usr/share/emacs/site-lisp/go-mode
    2.80 +
    2.81 +	# misc
    2.82 +	mkdir -p $install$GOROOT_FINAL/misc
    2.83 +	for dir in arm cgo goplay swig; do
    2.84 +		cp -a $src/misc/$dir $install$GOROOT_FINAL/misc
    2.85 +	done
    2.86 +
    2.87 +	# test
    2.88 +	cp -a $src/test/ $install$GOROOT_FINAL
    2.89 +
    2.90 +	# doc
    2.91 +	cp -a $src/doc/ $install$GOROOT_FINAL
    2.92 +
    2.93 +	# tools
    2.94 +	mkdir -p $install$GOROOT_FINAL/src
    2.95 +	cp -a $src/src/*.bash $install$GOROOT_FINAL/src
    2.96 +	cp -a $src/src/*.rc   $install$GOROOT_FINAL/src
    2.97  }
    2.98  
    2.99 -# Rules to gen a SliTaz package suitable for Tazpkg.
   2.100 -genpkg_rules()
   2.101 -{
   2.102 +genpkg_rules() {
   2.103  	case $PACKAGE in
   2.104 -	go)
   2.105 -		TAGS="go"
   2.106 -		DEPENDS=""
   2.107 -		mkdir -p $fs/usr/lib/go/src
   2.108 -		# bin
   2.109 -		cp -a $src/bin $fs/usr
   2.110 -		# go tree
   2.111 -		cp -a $src/pkg $fs/usr/lib/go
   2.112 -		# lib
   2.113 -		cp -a $src/lib $fs/usr/lib/go
   2.114 -		# include
   2.115 -		cp -a $src/include $fs/usr/lib/go
   2.116 -		# pkg
   2.117 -		cp -a $src/src/pkg $fs/usr/lib/go/src
   2.118 -		cp -a $src/src/cmd $fs/usr/lib/go/src
   2.119 -		cp -a $src/src/lib9 $fs/usr/lib/go/src
   2.120 -		;;
   2.121 -	emacs-pkg-go-mode)
   2.122 -		CAT="development|An Emacs major mode for editing Go code."
   2.123 -		TAGS="emacs go"
   2.124 -		DEPENDS="emacs"
   2.125 -		echo -n "Installing start file"
   2.126 -		mkdir -p $fs/usr/share/emacs/site-lisp/site-start.d && \
   2.127 -		cp -a stuff/80-go-init.el $fs/usr/share/emacs/site-lisp/site-start.d
   2.128 -		status
   2.129 -
   2.130 -		echo -n "Installing go-mode"
   2.131 -		mkdir -p $fs/usr/share/emacs/site-lisp/go-mode && \
   2.132 -		cp -a $src/misc/emacs/* $fs/usr/share/emacs/site-lisp/go-mode
   2.133 -		status
   2.134 -		;;
   2.135 -	go-sources)
   2.136 -		CAT="development|The Go programming language - Sources files."
   2.137 -		TAGS="go"
   2.138 -		DEPENDS="go"
   2.139 -		# misc
   2.140 -		mkdir -p $fs/usr/lib/go/misc
   2.141 -		for dir in arm cgo goplay swig; do
   2.142 -			cp -a $src/misc/$dir $fs/usr/lib/go/misc
   2.143 -		done
   2.144 -
   2.145 -		# test
   2.146 -		cp -a $src/test/ $fs/usr/lib/go
   2.147 -
   2.148 -		# doc
   2.149 -		cp -a $src/doc/ $fs/usr/lib/go
   2.150 -
   2.151 -		# tools
   2.152 -		mkdir -p $fs/usr/lib/go/src
   2.153 -		cp -a $src/src/*.bash $fs/usr/lib/go/src
   2.154 -		cp -a $src/src/*.rc $fs/usr/lib/go/src
   2.155 -		;;
   2.156 +		go-sources)
   2.157 +			copy /usr/lib/go/misc/ \
   2.158 +			     /usr/lib/go/test/ \
   2.159 +			     /usr/lib/go/src/
   2.160 +			CAT="development|sources files"
   2.161 +			TAGS="go"
   2.162 +			DEPENDS="go"
   2.163 +			;;
   2.164 +		emacs-pkg-go-mode)
   2.165 +			copy 80-go-init.el go-mode/
   2.166 +			CAT="development|an Emacs major mode for editing Go code"
   2.167 +			TAGS="emacs go"
   2.168 +			DEPENDS="emacs"
   2.169 +			;;
   2.170 +		go)
   2.171 +			copy @std @rm
   2.172 +			TAGS="go"
   2.173 +			DEPENDS=""
   2.174 +			;;
   2.175  	esac
   2.176  }
   2.177  
   2.178 -post_install_emacs_pkg_go_mode()
   2.179 -{
   2.180 +post_install_emacs_pkg_go_mode() {
   2.181  	chroot "$1/" tazpkg reconfigure emacs
   2.182  }
   2.183  
   2.184 -post_remove_emacs_pkg_go_mode()
   2.185 -{
   2.186 +post_remove_emacs_pkg_go_mode() {
   2.187  	chroot "$1/" tazpkg reconfigure emacs
   2.188  }