summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2021-08-30 14:49:25 -0500
committerLuis Martinez2021-08-30 14:49:25 -0500
commit8c932c276b3b5c07b333426ce042deadb4aedce8 (patch)
tree497ac195b3dc75d05e1e44d5060c58341ee75786
parent9ef3220525d510979828e6172218368756e60e7b (diff)
downloadaur-8c932c276b3b5c07b333426ce042deadb4aedce8.tar.gz
add completions; small fixes
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
2 files changed, 9 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c97dcda0df48..2f45d9efaae8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = timetrace
pkgdesc = A simple time-tracking CLI tool
pkgver = 0.13.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/dominikbraun/timetrace
install = timetrace.install
changelog = CHANGELOG.md
diff --git a/PKGBUILD b/PKGBUILD
index 83790276158c..b4c17b57e3ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=timetrace
pkgver=0.13.0
-pkgrel=2
+pkgrel=3
pkgdesc="A simple time-tracking CLI tool"
arch=('x86_64')
url="https://github.com/dominikbraun/timetrace"
@@ -23,7 +23,10 @@ build() {
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
cd "$pkgname-$pkgver"
- go build -o "$pkgname"
+ go build -o "$pkgname" -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.version=$pkgver"
+ "./$pkgname" completion bash > "$pkgname.sh"
+ "./$pkgname" completion zsh > "_$pkgname"
+ "./$pkgname" completion fish > "$pkgname.fish"
}
check() {
@@ -40,7 +43,9 @@ check() {
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "$pkgname" -t "$pkgdir/usr/bin/"
- install -Dm 644 completion/bash/timetrace.sh "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+ install -Dm 644 "$pkgname.sh" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+ install -Dm 644 "_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
+ install -Dm 644 "$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}