void-packages/srcpkgs/go/template

101 lines
3.2 KiB
Text
Raw Normal View History

2011-07-05 18:51:42 +00:00
# Template file for 'go'
pkgname=go
2013-05-30 09:07:25 +00:00
version=1.1
revision=1
2012-07-29 05:59:11 +00:00
wrksrc=go
nostrip=yes
2012-07-29 05:59:11 +00:00
makedepends="ed bison"
depends="perl gawk"
2011-07-05 18:51:42 +00:00
short_desc="The Go Programming Language"
maintainer="Juan RP <xtraeme@gmail.com>"
2011-07-05 18:51:42 +00:00
homepage="http://golang.org/"
license="BSD"
2012-07-29 05:59:11 +00:00
distfiles="http://go.googlecode.com/files/go${version}.src.tar.gz"
2013-05-30 09:07:25 +00:00
checksum="bf1d057d8386e840f9cd3f787252e26d8ee196852e9232a6f9ce762337b19cb6"
2011-07-05 18:51:42 +00:00
long_desc="
The Go programming language is an open source project to make programmers
more productive. Go is expressive, concise, clean, and efficient. Its
concurrency mechanisms make it easy to write programs that get the most out
of multicore and networked machines, while its novel type system enables
flexible and modular program construction. Go compiles quickly to machine
code yet has the convenience of garbage collection and the power of run-time
reflection. It's a fast, statically typed, compiled language that feels like
a dynamically typed, interpreted language."
2011-07-05 18:51:42 +00:00
2012-07-29 05:59:11 +00:00
do_build() {
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=arm
cd src
bash make.bash
2011-07-05 18:51:42 +00:00
2012-07-29 05:59:11 +00:00
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=386
cd src
bash make.bash
2011-07-05 18:51:42 +00:00
2012-07-29 06:14:16 +00:00
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
cd ${wrksrc}
export GOROOT_FINAL="/usr/lib/go"
export GOOS=linux
export GOARCH=amd64
cd src
bash make.bash
fi
2011-07-05 18:51:42 +00:00
}
do_install() {
2012-07-29 05:59:11 +00:00
vinstall LICENSE 644 usr/share/licenses/go
vinstall misc/bash/go 644 usr/share/bash-completion/completions
vinstall misc/emacs/go-mode-load.el 644 usr/share/emacs/site-lisp
vinstall misc/emacs/go-mode.el 644 usr/share/emacs/site-lisp
vinstall misc/zsh/go 644 usr/share/zsh/site-functions _go
for f in ftdetect/gofiletype.vim autoload/go/complete.vim indent/go.vim \
2013-05-30 09:07:25 +00:00
ftplugin/go/fmt.vim ftplugin/go/import.vim \
2012-07-29 05:59:11 +00:00
syntax/go.vim syntax/godoc.vim plugin/godoc.vim; do
vinstall misc/vim/$f 644 usr/share/vim/vimfiles
2011-07-05 18:51:42 +00:00
done
2012-07-29 05:59:11 +00:00
install -d ${DESTDIR}/{etc/profile.d,usr/{share/go,lib/go,lib/go/src}}
cp -r doc misc -t ${DESTDIR}/usr/share/go
ln -s /usr/share/go/doc ${DESTDIR}/usr/lib/go/doc
cp -a bin ${DESTDIR}/usr
cp -a pkg ${DESTDIR}/usr/lib/go
cp -a src/pkg ${DESTDIR}/usr/lib/go/src/
cp -a src/cmd ${DESTDIR}/usr/lib/go/src/cmd
cp -a src/lib9 ${DESTDIR}/usr/lib/go/src/
cp -a lib ${DESTDIR}/usr/lib/go/
install -Dm644 src/Make.* ${DESTDIR}/usr/lib/go/src
# Remove object files from target src dir
find ${DESTDIR}/usr/lib/go/src/ -type f -name '*.[ao]' -delete
find ${DESTDIR}/usr/lib/go/src/pkg -type f -executable -delete
# Headers for C modules
vinstall src/pkg/runtime/runtime.h 644 usr/lib/go/src/pkg/runtime
vinstall src/pkg/runtime/cgocall.h 644 usr/lib/go/src/pkg/runtime
# For packages that source /etc/profile.d/go.sh
vinstall ${FILESDIR}/go.sh 755 etc/profile.d
# This is to make go get code.google.com/p/go-tour/gotour and
# then running the gotour executable work out of the box.
#
# Also, /usr/bin is the place for system-wide executables,
# not /usr/lib/go/bin. Users should use different paths by
# setting the appropriate environment variables.
#
ln -sf /usr/bin ${DESTDIR}/usr/lib/go/bin
# For godoc
vinstall favicon.ico 644 usr/lib/go
rm -f ${DESTDIR}/usr/share/go/doc/articles/wiki/get.bin
2011-07-05 18:51:42 +00:00
}