wok-next view go/receipt @ rev 20236
linux-cloop: tiny patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 06 10:18:18 2017 +0100 (2017-11-06) |
parents | 14aaa769338b |
children | 8164c0612ccf |
line source
1 # SliTaz package receipt v2.
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"
13 BUILD_DEPENDS="bash bison make ed wget"
14 SPLIT="go emacs-pkg-go-mode go-sources"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src/src
21 # Setting up environnment before building go.
22 # For more information, see: http://golang.org/doc/install/source
24 # Go tree, binaries and scripts locations.
25 export GOROOT_FINAL=/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" ;;
43 i486)
44 # Comparable to the amd64
45 export GOARCH="386" ;;
47 arm)
48 # Supports Linux, FreeBSD and NetBSD binaries. Less widely used
49 # than the other ports.
50 export GOARCH="arm"
51 # ARM11 (VFPv1) or better cores + cross-compiling.
52 export GOARM=6 ;;
53 esac
55 # Build go
56 /bin/bash make.bash --no-banner
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 case $PACKAGE in
63 go)
64 TAGS="go"
65 DEPENDS=""
66 mkdir -p $fs/usr/lib/go/src
67 # bin
68 cp -a $src/bin $fs/usr
69 # go tree
70 cp -a $src/pkg $fs/usr/lib/go
71 # lib
72 cp -a $src/lib $fs/usr/lib/go
73 # include
74 cp -a $src/include $fs/usr/lib/go
75 # pkg
76 cp -a $src/src/pkg $fs/usr/lib/go/src
77 cp -a $src/src/cmd $fs/usr/lib/go/src
78 cp -a $src/src/lib9 $fs/usr/lib/go/src
79 ;;
80 emacs-pkg-go-mode)
81 CAT="development|An Emacs major mode for editing Go code."
82 TAGS="emacs go"
83 DEPENDS="emacs"
84 echo -n "Installing start file"
85 mkdir -p $fs/usr/share/emacs/site-lisp/site-start.d && \
86 cp -a stuff/80-go-init.el $fs/usr/share/emacs/site-lisp/site-start.d
87 status
89 echo -n "Installing go-mode"
90 mkdir -p $fs/usr/share/emacs/site-lisp/go-mode && \
91 cp -a $src/misc/emacs/* $fs/usr/share/emacs/site-lisp/go-mode
92 status
93 ;;
94 go-sources)
95 CAT="development|The Go programming language - Sources files."
96 TAGS="go"
97 DEPENDS="go"
98 # misc
99 mkdir -p $fs/usr/lib/go/misc
100 for dir in arm cgo goplay swig; do
101 cp -a $src/misc/$dir $fs/usr/lib/go/misc
102 done
104 # test
105 cp -a $src/test/ $fs/usr/lib/go
107 # doc
108 cp -a $src/doc/ $fs/usr/lib/go
110 # tools
111 mkdir -p $fs/usr/lib/go/src
112 cp -a $src/src/*.bash $fs/usr/lib/go/src
113 cp -a $src/src/*.rc $fs/usr/lib/go/src
114 ;;
115 esac
116 }
118 post_install_emacs_pkg_go_mode()
119 {
120 chroot "$1/" tazpkg reconfigure emacs
121 }
123 post_remove_emacs_pkg_go_mode()
124 {
125 chroot "$1/" tazpkg reconfigure emacs
126 }