New package: dep

This commit is contained in:
Andrea Brancaleoni 2017-09-15 19:18:31 +02:00 committed by Andrea Brancaleoni
parent 70e9a87b92
commit d8f6972200
2 changed files with 29 additions and 1 deletions

View File

@ -3,12 +3,17 @@
#
do_build() {
if [[ "${go_get}" != "yes" ]]; then
local path="${GOPATH}/src/${go_import_path}"
if [[ "${go_get}" != "yes" ]]; then
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
fi
if [[ -x /usr/bin/dep ]]; then
cd "${path}"
dep ensure
fi
go_package=${go_package:-$go_import_path}
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
}

23
srcpkgs/dep/template Normal file
View File

@ -0,0 +1,23 @@
# Template file for 'dep'
pkgname=dep
version=0.3.0
revision=1
build_style=go
hostmakedepends="git"
depends="git go"
short_desc="Go dependency management tool"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache"
go_import_path="github.com/golang/dep"
go_package="$go_import_path/cmd/dep"
homepage="https://$go_import_path"
distfiles="$homepage/archive/v$version.tar.gz"
checksum=7d816ffb14f57c4b01352676998a8cda9e4fb24eaec92bd79526e1045c5a0c83
pre_build() {
git config --global http.https://gopkg.in.followRedirects true
}
post_install() {
vlicense LICENSE
}