summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSimon Legner2018-02-01 20:20:16 +0100
committerSimon Legner2018-02-01 20:20:16 +0100
commite50e6cd1e0f6f53b1f6951629c7394f57240a01d (patch)
treecc93deabfb3864ae68d01b235312defaca3e53a6 /PKGBUILD
parentbcd9764beb0e4d21b99c4a817439ab56bf795e66 (diff)
downloadaur-e50e6cd1e0f6f53b1f6951629c7394f57240a01d.tar.gz
0.6.0-2: Use dep ensure, go build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD20
1 files changed, 15 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4712fc9796b3..71c971c283b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,32 @@
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
pkgname=aur-out-of-date
pkgver=0.6.0
-pkgrel=1
+pkgrel=2
pkgdesc="Determines out-of-date AUR packages"
arch=('x86_64' 'i686')
url="https://github.com/simon04/aur-out-of-date"
license=('GPL')
source=("https://github.com/simon04/$pkgname/archive/v$pkgver.tar.gz")
-makedepends=('git' 'go')
+makedepends=('go' 'dep')
+
+_importpath="github.com/simon04/$pkgname"
+
+prepare() {
+ export GOPATH="$srcdir/_go"
+ mkdir -p $(dirname "$GOPATH/src/$_importpath")
+ ln -sf "$srcdir/$pkgname-$pkgver" "$GOPATH/src/$_importpath"
+}
build() {
- cd "$pkgname-$pkgver"
- GOPATH="$srcdir" TMPDIR=/tmp go get -u github.com/simon04/aur-out-of-date/...
+ cd "$GOPATH/src/$_importpath"
+ dep ensure
+ go build
}
package() {
+ cd "$GOPATH/src/$_importpath"
install -dm755 "$pkgdir/usr/bin"
- install -m755 "$srcdir/bin/aur-out-of-date" "$pkgdir/usr/bin/aur-out-of-date"
+ install -m755 "$pkgname" "$pkgdir/usr/bin/aur-out-of-date"
}
sha256sums=('37458cb6b92cfe8b0f717779d7ba3b9cd4f7520513f3fea60f7d4864b08f083f')