summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeveren Redwood2022-12-16 03:05:28 +1300
committerSeveren Redwood2022-12-16 03:05:28 +1300
commit264b2bb92cee6b4d8ec5e2c56fd4589f1a382e97 (patch)
tree13b6bebf7a4b15ff8e701efa61740c8f0b09d21c
parentcbc70881b9e544e954a3e2c63fcbac26b46f596e (diff)
downloadaur-264b2bb92cee6b4d8ec5e2c56fd4589f1a382e97.tar.gz
Properly install completions and produce reproducible builds
-rw-r--r--PKGBUILD18
1 files changed, 13 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3b7fd0361b85..4ff13240d13e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=("i686" "x86_64")
url="https://github.com/exercism/cli"
license=("MIT")
depends=("glibc")
-makedepends=("go-pie")
+makedepends=("go")
source=("https://github.com/exercism/cli/archive/v${pkgver}.tar.gz")
sha256sums=('34653a6a45d49daef10db05672c9b4e36c3c30e09d57c3c0f737034d071ae4f6')
@@ -23,15 +23,23 @@ build() {
export GOPATH="$srcdir/.gopath"
cd "$GOPATH/src/github.com/exercism/cli"
- go build -o out/exercism exercism/main.go
+
+ go build \
+ -buildmode pie \
+ -ldflags "-extldflags $LDFLAGS" \
+ -trimpath \
+ -o out/exercism \
+ exercism/main.go
}
-package(){
+package() {
cd $srcdir/cli-${pkgver}
install -D out/exercism "$pkgdir/usr/bin/exercism"
+ install -D -m644 shell/exercism_completion.bash "$pkgdir/usr/share/bash-completion/completions/${pkgname}"
+ install -D -m644 shell/exercism_completion.zsh "$pkgdir/usr/share/zsh/site-functions/_${pkgname}"
+ install -D -m644 shell/exercism.fish "$pkgdir/usr/share/fish/vendor_completions.d/exercism.fish"
+
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -D -m644 shell/exercism_completion.bash "$pkgdir/usr/share/$pkgname/completion/exercism_completion.bash"
- install -D -m644 shell/exercism_completion.zsh "$pkgdir/usr/share/$pkgname/completion/exercism_completion.zsh"
}