summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Roberts2019-02-23 01:08:13 +0000
committerPeter Roberts2019-02-23 01:08:13 +0000
commit52875ba5664266ed0afa208cc947559a79b46a76 (patch)
tree4cc13e1b3149578ec6ba3125b6bebdfbb9044c32
parentadf52cce76cdfadacd520a36c9146ccbecf3743f (diff)
downloadaur-52875ba5664266ed0afa208cc947559a79b46a76.tar.gz
v0.1.0
Also make things more robust
-rw-r--r--PKGBUILD27
1 files changed, 18 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8a802670bdef..a5315ed963f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Peter Roberts <me@peter-r.co.uk>
pkgname=zoom-parallel
-pkgver=0.0.4
+pkgver=0.1.0
pkgrel=1
pkgdesc="Parallel command executor with a focus on simplicity and good cross-platform behaviour "
arch=("x86_64")
@@ -9,21 +9,30 @@ license=('MIT')
depends=("glibc")
makedepends=("go-pie")
source=("https://github.com/pwr22/zoom/archive/v$pkgver.tar.gz")
-sha256sums=("89af374fe89ea082e6b3b9e9b1d33b0008b650378c5ea77fb1f776cc3d769802")
+sha256sums=("ebca9896023ca15bf460cf0f63d46e4f8887d43faae726b7e4b8b1adfd06cabd")
_cmdname=zoom # name of the command - there's a clash so the package name is longer
-# Go stuff based on https://wiki.archlinux.org/index.php/Go_package_guidelines#Basic_PKGBUILD
+# Go stuff based on https://wiki.archlinux.org/index.php/Go_package_guidelines
+
+prepare(){
+ mkdir -p "go/src/github.com/pwr22"
+ ln -rTsf "$_cmdname-$pkgver" "go/src/github.com/pwr22/$_cmdname"
+
+ export GOPATH="$srcdir/go"
+ export GOFLAGS="-gcflags=all=-trimpath=$PWD -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-$LDFLAGS"
+
+ cd "go/src/github.com/pwr22/$_cmdname" # going through the symlink is necessary to make go get happy
+ go get ./...
+}
build() {
cd "$_cmdname-$pkgver"
- GOPATH="$srcdir/go" go build
- go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
- -o "$_cmdname" .
+ export GOPATH="$srcdir/go"
+ export GOFLAGS="-gcflags=all=-trimpath=$PWD -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-$LDFLAGS"
+
+ go build -o "$_cmdname"
}
package() {