wok-6.x view go/receipt @ rev 23702
Up tazlito (525)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Apr 28 07:57:17 2020 +0000 (2020-04-28) |
parents | 14aaa769338b |
children | a3c45ab9082e |
line source
1 # SliTaz package receipt.
3 PACKAGE="go"
4 VERSION="1.2.1"
5 CATEGORY="development"
6 SHORT_DESC="The Go programming language (R.Griesemer R.Pike K.Thompson)"
7 MAINTAINER="domcox@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://www.golang.org"
10 TARBALL="$PACKAGE$VERSION.src.tar.gz"
11 WGET_URL="https://go.googlecode.com/files/$TARBALL"
12 TAGS="go"
14 DEPENDS=""
15 BUILD_DEPENDS="bash bison make ed wget"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 sed -i 's|gohostarch = "amd64"|gohostarch = "386"|' src/cmd/dist/unix.c
21 cd $src/src
23 # Setting up environnment before building go.
24 # For more information, see: http://golang.org/doc/install/source
26 # Go tree, binaries and scripts locations.
27 export GOROOT_FINAL=/usr/lib/go
29 # Support all x86 chips (Pentium MMX or later)
30 # or optionaly only Pentium 4/Opteron/Athlon 64 or later.
31 export GO386=387 # Pentium MMX or later
32 # export GO386=sse2 # Pentium 4/Opteron/Athlon 64 or later
34 # Target operating system (optional).
35 export GOOS=linux
37 # Target compilation architecture.
38 case $ARCH in
39 x86_64)
40 # A mature implementation. The compiler has an effective optimizer
41 # (registerizer) and generates good code (although gccgo can do
42 # noticeably better sometimes).
43 export GOARCH="amd64" ;;
45 i486)
46 # Comparable to the amd64
47 export GOARCH="386" ;;
49 arm)
50 # Supports Linux, FreeBSD and NetBSD binaries. Less widely used
51 # than the other ports.
52 export GOARCH="arm"
53 # ARM11 (VFPv1) or better cores + cross-compiling.
54 export GOARM=6 ;;
55 esac
57 # Build go
58 /bin/bash make.bash --no-banner
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/usr/lib/go/src
65 # bin
66 cp -a $src/bin $fs/usr
67 # go tree
68 cp -a $src/pkg $fs/usr/lib/go
69 # lib
70 cp -a $src/lib $fs/usr/lib/go
71 # include
72 cp -a $src/include $fs/usr/lib/go
73 # pkg
74 cp -a $src/src/pkg $fs/usr/lib/go/src
75 cp -a $src/src/cmd $fs/usr/lib/go/src
76 cp -a $src/src/lib9 $fs/usr/lib/go/src
77 }