2015-02-21 12:38:37 +00:00
|
|
|
#
|
|
|
|
# This helper is for templates for Go packages.
|
|
|
|
#
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
if [[ "${go_get}" != "yes" ]]; then
|
2015-02-21 12:52:10 +00:00
|
|
|
local path="${GOPATH}/src/${go_import_path}"
|
2015-02-21 12:38:37 +00:00
|
|
|
mkdir -p "$(dirname ${path})"
|
|
|
|
ln -fs $PWD "${path}"
|
|
|
|
fi
|
|
|
|
|
2015-02-21 13:34:03 +00:00
|
|
|
go get -d "${go_import_path}"
|
2015-02-21 12:52:10 +00:00
|
|
|
go build -x "${go_import_path}"
|
2015-02-21 12:38:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vbin ${pkgname}
|
|
|
|
}
|