wok view go/receipt @ rev 24789
grep: add post_install (install)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 21 09:36:52 2022 +0000 (2022-03-21) |
parents | b354f5852f7a |
children | 00e3b45c063b |
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 current_version()
18 {
19 wget -O - https://golang.org/dl 2>/dev/null | \
20 sed '/go[0-9]/!d;/src/!d;s|.*/dl/go\(.*\).src.*".*|\1|;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 sed -i 's|gohostarch = "amd64"|gohostarch = "386"|' src/cmd/dist/unix.c
27 cd $src/src
29 # Setting up environnment before building go.
30 # For more information, see: http://golang.org/doc/install/source
32 # Go tree, binaries and scripts locations.
33 export GOROOT_FINAL=/usr/lib/go
35 # Support all x86 chips (Pentium MMX or later)
36 # or optionaly only Pentium 4/Opteron/Athlon 64 or later.
37 export GO386=387 # Pentium MMX or later
38 # export GO386=sse2 # Pentium 4/Opteron/Athlon 64 or later
40 # Target operating system (optional).
41 export GOOS=linux
43 # Target compilation architecture.
44 case $ARCH in
45 x86_64)
46 # A mature implementation. The compiler has an effective optimizer
47 # (registerizer) and generates good code (although gccgo can do
48 # noticeably better sometimes).
49 export GOARCH="amd64" ;;
51 i486)
52 # Comparable to the amd64
53 export GOARCH="386" ;;
55 arm)
56 # Supports Linux, FreeBSD and NetBSD binaries. Less widely used
57 # than the other ports.
58 export GOARCH="arm"
59 # ARM11 (VFPv1) or better cores + cross-compiling.
60 export GOARM=6 ;;
61 esac
63 # Build go
64 /bin/bash make.bash --no-banner
65 }
67 # Rules to gen a SliTaz package suitable for Tazpkg.
68 genpkg_rules()
69 {
70 mkdir -p $fs/usr/lib/go/src
71 # bin
72 cp -a $src/bin $fs/usr
73 # go tree
74 cp -a $src/pkg $fs/usr/lib/go
75 # lib
76 cp -a $src/lib $fs/usr/lib/go
77 # include
78 cp -a $src/include $fs/usr/lib/go
79 # pkg
80 cp -a $src/src/pkg $fs/usr/lib/go/src
81 cp -a $src/src/cmd $fs/usr/lib/go/src
82 cp -a $src/src/lib9 $fs/usr/lib/go/src
83 }