wok-next view go/receipt @ rev 20916

libopenraw, abiword: update deps; boost: pack unpacked libs
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 21 05:42:25 2018 +0300 (2018-08-21)
parents 8164c0612ccf
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="go"
4 VERSION="1.10.2"
5 CATEGORY="development"
6 SHORT_DESC="The Go programming language"
7 MAINTAINER="domcox@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://golang.org/"
11 TARBALL="$PACKAGE$VERSION.src.tar.gz"
12 WGET_URL="https://dl.google.com/go/$TARBALL"
14 BUILD_DEPENDS="go-bin bash bison make ed"
15 SPLIT="go-sources emacs-pkg-go-mode go"
17 compile_rules() {
18 cd $src/src
20 # Setting up environnment before building go.
21 # For more information, see: http://golang.org/doc/install/source
23 # Go tree, binaries and scripts locations.
24 export GOROOT_FINAL=/usr/lib/go
25 export GOROOT_BOOTSTRAP=/usr/lib/go
27 # Support all x86 chips (Pentium MMX or later)
28 # or optionaly only Pentium 4/Opteron/Athlon 64 or later.
29 export GO386=387 # Pentium MMX or later
30 # export GO386=sse2 # Pentium 4/Opteron/Athlon 64 or later
32 # Target operating system (optional).
33 export GOOS=linux
35 # Target compilation architecture.
36 case $ARCH in
37 x86_64)
38 # A mature implementation. The compiler has an effective optimizer
39 # (registerizer) and generates good code (although gccgo can do
40 # noticeably better sometimes).
41 export GOARCH="amd64" ;;
42 i486)
43 # Comparable to the amd64
44 export GOARCH="386" ;;
45 arm)
46 # Supports Linux, FreeBSD and NetBSD binaries. Less widely used
47 # than the other ports.
48 export GOARCH="arm"
49 # ARM11 (VFPv1) or better cores + cross-compiling.
50 export GOARM=6 ;;
51 esac
53 # Build go
54 /bin/bash make.bash --no-clean || return 1
56 # Installation
57 mkdir -p $install$GOROOT_FINAL/src
58 # bin
59 cp -a $src/bin $install/usr
60 # go tree
61 cp -a $src/pkg $install$GOROOT_FINAL
62 # lib
63 cp -a $src/lib $install$GOROOT_FINAL
64 # include
65 cp -a $src/include $install$GOROOT_FINAL
66 # pkg
67 cp -a $src/src/pkg $install$GOROOT_FINAL/src
68 cp -a $src/src/cmd $install$GOROOT_FINAL/src
69 cp -a $src/src/lib9 $install$GOROOT_FINAL/src
71 mkdir -p $install/usr/share/emacs/site-lisp/site-start.d
72 cp -a $stuff/80-go-init.el $install/usr/share/emacs/site-lisp/site-start.d
73 mkdir -p $install/usr/share/emacs/site-lisp/go-mode
74 cp -a $src/misc/emacs/* $install/usr/share/emacs/site-lisp/go-mode
76 # misc
77 mkdir -p $install$GOROOT_FINAL/misc
78 for dir in arm cgo goplay swig; do
79 cp -a $src/misc/$dir $install$GOROOT_FINAL/misc
80 done
82 # test
83 cp -a $src/test/ $install$GOROOT_FINAL
85 # doc
86 cp -a $src/doc/ $install$GOROOT_FINAL
88 # tools
89 mkdir -p $install$GOROOT_FINAL/src
90 cp -a $src/src/*.bash $install$GOROOT_FINAL/src
91 cp -a $src/src/*.rc $install$GOROOT_FINAL/src
92 }
94 genpkg_rules() {
95 case $PACKAGE in
96 go-sources)
97 copy /usr/lib/go/misc/ \
98 /usr/lib/go/test/ \
99 /usr/lib/go/src/
100 CAT="development|sources files"
101 TAGS="go"
102 DEPENDS="go"
103 ;;
104 emacs-pkg-go-mode)
105 copy 80-go-init.el go-mode/
106 CAT="development|an Emacs major mode for editing Go code"
107 TAGS="emacs go"
108 DEPENDS="emacs"
109 ;;
110 go)
111 copy @std @rm
112 TAGS="go"
113 DEPENDS=""
114 ;;
115 esac
116 }
118 post_install_emacs_pkg_go_mode() {
119 chroot "$1/" tazpkg reconfigure emacs
120 }
122 post_remove_emacs_pkg_go_mode() {
123 chroot "$1/" tazpkg reconfigure emacs
124 }