summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDavid Flemström2019-03-25 21:21:53 +0100
committerDavid Flemström2019-03-25 21:21:53 +0100
commitee29a50641c1f2eb785dd744cdfe542dae251147 (patch)
tree548ff114e81b199f0b9f441cd89e4ce4344f4911 /PKGBUILD
parent74878011e74994dfc37adae45dd0ff7d56ef55b2 (diff)
downloadaur-ee29a50641c1f2eb785dd744cdfe542dae251147.tar.gz
Upgrade to 1.4.0; switch to building with Go modules
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD63
1 files changed, 27 insertions, 36 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 037317230830..1afd20606650 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
# Maintainer: David Flemström <david.flemstrom@gmail.com>
pkgname=prototool-git
-pkgver=1.3.0.r12.g5794c37
+pkgver=1.4.0.r1.g1c2c34f
pkgrel=1
pkgdesc="Your Swiss Army Knife for Protocol Buffers"
arch=(x86_64)
url="https://github.com/uber/prototool"
license=('MIT')
-makedepends=(dep git go-pie)
+makedepends=(git go-pie)
depends=(glibc)
source=("$pkgname::git+https://github.com/uber/prototool.git")
md5sums=(SKIP)
@@ -17,47 +17,38 @@ pkgver() {
}
prepare() {
- mkdir -p "gopath/src/github.com/uber"
- ln -rTsf "$pkgname" "gopath/src/github.com/uber/prototool"
-
- export GOPATH="$srcdir"/gopath
- export PATH="$GOPATH/bin:$PATH"
- cd "gopath/src/github.com/uber/prototool"
-
- dep ensure -v
+ export GO111MODULE=on
+ cd "$pkgname"
+ go get -d .
}
build() {
- export GOPATH="$srcdir/gopath"
- export PATH="$GOPATH/bin:$PATH"
- cd "gopath/src/github.com/uber/prototool"
-
- go build \
- -a \
- -gcflags "all=-trimpath=${PWD}" \
- -asmflags "all=-trimpath=${PWD}" \
- -ldflags "-X 'github.com/uber/prototool/internal/vars.GitCommit=$(git rev-list -1 HEAD)' -X 'github.com/uber/prototool/internal/vars.BuiltTimestamp=$(date -u)' -extldflags ${LDFLAGS}" \
- -o prototool \
- internal/cmd/prototool/main.go
-
- go run internal/cmd/gen-prototool-bash-completion/main.go > prototool-bash-completion
- go run internal/cmd/gen-prototool-zsh-completion/main.go > prototool-zsh-completion
- mkdir prototool-manpages
- go run internal/cmd/gen-prototool-manpages/main.go prototool-manpages
+ export GO111MODULE=on
+ cd "$pkgname"
+ go build \
+ -gcflags "all=-trimpath=${PWD}" \
+ -asmflags "all=-trimpath=${PWD}" \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ -o prototool \
+ ./cmd/prototool
+ go run ./internal/cmd/gen-prototool-bash-completion/main.go > prototool-bash-completion
+ go run ./internal/cmd/gen-prototool-zsh-completion/main.go > prototool-zsh-completion
+ mkdir -p prototool-manpages
+ go run ./internal/cmd/gen-prototool-manpages/main.go prototool-manpages
}
package() {
- cd "$pkgname"
+ cd "$pkgname"
- mkdir -p "$pkgdir/etc/bash_completion.d"
- mkdir -p "$pkgdir/etc/zsh/site-functions"
- mkdir -p "$pkgdir/usr/share/man/man1"
- mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
+ mkdir -p "$pkgdir/etc/bash_completion.d"
+ mkdir -p "$pkgdir/etc/zsh/site-functions"
+ mkdir -p "$pkgdir/usr/share/man/man1"
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
- install -m644 prototool-bash-completion "$pkgdir/etc/bash_completion.d/prototool"
- install -m644 prototool-zsh-completion "$pkgdir/etc/zsh/site-functions/_prototool"
- cp -r prototool-manpages/. "$pkgdir/usr/share/man/man1/."
- install -Dm644 "$srcdir/$pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
+ install -m644 prototool-bash-completion "$pkgdir/etc/bash_completion.d/prototool"
+ install -m644 prototool-zsh-completion "$pkgdir/etc/zsh/site-functions/_prototool"
+ cp -r prototool-manpages/. "$pkgdir/usr/share/man/man1/."
+ install -Dm644 "$srcdir/$pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
- install -Dm755 prototool -t "$pkgdir/usr/bin/"
+ install -Dm755 prototool -t "$pkgdir/usr/bin/"
}