summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerin Stock2017-12-18 10:34:14 -0800
committerTerin Stock2017-12-18 10:46:57 -0800
commite8faa3342f5de4387aee33ac8370958744e1f314 (patch)
treeca801539699c331e90c280f44d7b56d087b565c7
parent6a3404b122123d448ffc3f966086d01a68ce3e27 (diff)
downloadaur-e8faa3342f5de4387aee33ac8370958744e1f314.tar.gz
dep: v0.3.2
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD45
2 files changed, 27 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 977bf3290494..76d6342734b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
pkgbase = dep
- pkgdesc = Go dependency management tool
+ pkgdesc = Go dependency tool
pkgver = 0.3.2
pkgrel = 1
url = https://github.com/golang/dep
- arch = i686
arch = x86_64
+ arch = i686
license = BSD
makedepends = go
- options = !emptydirs
+ makedepends = git
+ provides = dep
options = !strip
+ options = !emptydirs
source = https://github.com/golang/dep/archive/v0.3.2.tar.gz
sha256sums = 327124953d76293eaba6001e17bb8a31371313ab39eed1fa9eac01f8b5c1de21
diff --git a/PKGBUILD b/PKGBUILD
index 5e2a1636d3be..ddd00c3f3f27 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,39 @@
+# Maintainer: Terin Stock <terinjokes@gmail.com>
# Contributor: Tom Tobin <archlinux@tomxtobin.com>
pkgname=dep
pkgver=0.3.2
pkgrel=1
-pkgdesc="Go dependency management tool"
-arch=('i686' 'x86_64')
-_vendor="github.com/golang/${pkgname}"
-url="https://${_vendor}"
+_commitHash="8ddfc8afb2d520d41997ebddd921b52152706c01"
+pkgdesc="Go dependency tool"
+arch=('x86_64' 'i686')
+url="https://github.com/golang/dep"
license=('BSD')
-makedepends=('go')
-options=('!emptydirs' '!strip')
-source=("https://${_vendor}/archive/v${pkgver}.tar.gz")
-_git_commit='83789e236d7ff64c82ee8392005455fc1ec1983b'
+makedepends=('go' 'git')
+options=('!strip' '!emptydirs')
+provides=("dep")
+source=("https://github.com/golang/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('327124953d76293eaba6001e17bb8a31371313ab39eed1fa9eac01f8b5c1de21')
-_ldflags="\
--s \
--w \
--X main.buildDate=$(date --iso-8601) \
--X main.commitHash=$_git_commit \
--X main.version=v$pkgver"
-_vendorpath="gopath/src/$_vendor"
-_buildpath="$_vendorpath/cmd/dep"
+_importpath='github.com/golang/dep'
+_ldflags="-s -w -X main.buildDate=$(date "+%Y-%m-%d") -X main.commitHash=${_commitHash} -X main.Version=v${pkgver}"
prepare() {
- mkdir -p $_vendorpath
- mv -T $pkgname-$pkgver $_vendorpath
+ if [[ ! -r ${_importpath} ]]; then
+ mkdir -p "src/$(dirname "${_importpath}")"
+ ln -sf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/${_importpath}"
+ fi
}
build() {
- export GOPATH="$srcdir/gopath"
- cd $_buildpath
- go build -ldflags "$_ldflags" -o bin/$pkgname
+ export GOPATH="$srcdir"
+ go install -ldflags="${_ldflags}" "${_importpath}/cmd/dep"
}
package() {
- install -Dm755 $_buildpath/bin/$pkgname $pkgdir/usr/bin/$pkgname
- install -Dm644 $_vendorpath/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 "../bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+
+# vim:set ts=2 sw=2 et: