wok annotate go/receipt @ rev 25589

xinput-calibrator: fix wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 15 10:35:54 2023 +0000 (17 months ago)
parents 00e3b45c063b
children
rev   line source
domcox@16005 1 # SliTaz package receipt.
domcox@16005 2
domcox@16005 3 PACKAGE="go"
domcox@16005 4 VERSION="1.2.1"
domcox@16005 5 CATEGORY="development"
domcox@16005 6 SHORT_DESC="The Go programming language (R.Griesemer R.Pike K.Thompson)"
domcox@16005 7 MAINTAINER="domcox@slitaz.org"
domcox@16005 8 LICENSE="BSD"
pascal@25540 9 WEB_SITE="https://golang.org/"
domcox@16005 10 TARBALL="$PACKAGE$VERSION.src.tar.gz"
pascal@24978 11 WGET_URL="https://github.com/golang/go/archive/go$VERSION.tar.gz"
domcox@16005 12 TAGS="go"
domcox@16005 13
domcox@16005 14 DEPENDS=""
pascal@16009 15 BUILD_DEPENDS="bash bison make ed wget"
domcox@16005 16
pascal@24083 17 current_version()
pascal@24083 18 {
pascal@24083 19 wget -O - https://golang.org/dl 2>/dev/null | \
pascal@24083 20 sed '/go[0-9]/!d;/src/!d;s|.*/dl/go\(.*\).src.*".*|\1|;q'
pascal@24083 21 }
pascal@24083 22
domcox@16005 23 # Rules to configure and make the package.
domcox@16005 24 compile_rules()
domcox@16005 25 {
pascal@20580 26 sed -i 's|gohostarch = "amd64"|gohostarch = "386"|' src/cmd/dist/unix.c
domcox@16005 27 cd $src/src
domcox@16005 28
domcox@16005 29 # Setting up environnment before building go.
domcox@16005 30 # For more information, see: http://golang.org/doc/install/source
domcox@16005 31
domcox@16005 32 # Go tree, binaries and scripts locations.
domcox@16005 33 export GOROOT_FINAL=/usr/lib/go
domcox@16005 34
domcox@16005 35 # Support all x86 chips (Pentium MMX or later)
domcox@16005 36 # or optionaly only Pentium 4/Opteron/Athlon 64 or later.
domcox@16005 37 export GO386=387 # Pentium MMX or later
domcox@16005 38 # export GO386=sse2 # Pentium 4/Opteron/Athlon 64 or later
domcox@16005 39
domcox@16005 40 # Target operating system (optional).
domcox@16005 41 export GOOS=linux
domcox@16005 42
domcox@16005 43 # Target compilation architecture.
domcox@16005 44 case $ARCH in
domcox@16005 45 x86_64)
domcox@16005 46 # A mature implementation. The compiler has an effective optimizer
domcox@16005 47 # (registerizer) and generates good code (although gccgo can do
domcox@16005 48 # noticeably better sometimes).
domcox@16005 49 export GOARCH="amd64" ;;
domcox@16005 50
domcox@16005 51 i486)
domcox@16005 52 # Comparable to the amd64
domcox@16005 53 export GOARCH="386" ;;
domcox@16005 54
domcox@16005 55 arm)
domcox@16005 56 # Supports Linux, FreeBSD and NetBSD binaries. Less widely used
domcox@16005 57 # than the other ports.
domcox@16005 58 export GOARCH="arm"
domcox@16005 59 # ARM11 (VFPv1) or better cores + cross-compiling.
domcox@16005 60 export GOARM=6 ;;
domcox@16005 61 esac
domcox@16005 62
domcox@16005 63 # Build go
domcox@16005 64 /bin/bash make.bash --no-banner
domcox@16005 65 }
domcox@16005 66
domcox@16005 67 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@16005 68 genpkg_rules()
domcox@16005 69 {
domcox@16045 70 mkdir -p $fs/usr/lib/go/src
domcox@16005 71 # bin
domcox@16005 72 cp -a $src/bin $fs/usr
domcox@16005 73 # go tree
domcox@16005 74 cp -a $src/pkg $fs/usr/lib/go
domcox@16005 75 # lib
domcox@16005 76 cp -a $src/lib $fs/usr/lib/go
domcox@16005 77 # include
domcox@16005 78 cp -a $src/include $fs/usr/lib/go
domcox@16045 79 # pkg
domcox@16045 80 cp -a $src/src/pkg $fs/usr/lib/go/src
domcox@16045 81 cp -a $src/src/cmd $fs/usr/lib/go/src
domcox@16045 82 cp -a $src/src/lib9 $fs/usr/lib/go/src
domcox@16005 83 }