Skip to content

Instantly share code, notes, and snippets.

@majewsky
Last active February 9, 2018 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save majewsky/348cac48461a111967ca4e1f403a8673 to your computer and use it in GitHub Desktop.
Save majewsky/348cac48461a111967ca4e1f403a8673 to your computer and use it in GitHub Desktop.
--- a/prometheus/PKGBUILD
+++ b/prometheus/PKGBUILD
@@ -21,6 +21,7 @@
prepare() {
cd "$srcdir/$pkgname-$pkgver" || exit 1
export GOPATH="$srcdir/gopath"
+ export GOBIN="$GOPATH/bin"
mkdir -p "$GOPATH/src/github.com/$pkgname"
rm -f "$GOPATH/src/github.com/$pkgname/$pkgname"
ln -sr "$srcdir/$pkgname-$pkgver" "$GOPATH/src/github.com/$pkgname/$pkgname"
@majewsky
Copy link
Author

majewsky commented Feb 9, 2018

The PKGBUILD assumes that $GOBIN is not set, so the default value for $GOBIN gets applied. Since I have $GOBIN set, promu gets installed by make build to $GOBIN rather than to $srcdir/gopath/bin, and the build subsequently fails to execute promu. By setting GOBIN explicitly, we can avoid this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment