summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedroHLC2020-08-31 15:43:03 -0300
committerPedroHLC2020-08-31 15:43:03 -0300
commit8cdc6ad61cc34abe0be4145465a6db060df594d3 (patch)
tree13f248cec8fd2e95cd28fc43daf0586c4f7d97ce
parent30013fdec730056560522b2dda541c5b02f4d56f (diff)
downloadaur-8cdc6ad61cc34abe0be4145465a6db060df594d3.tar.gz
Update by bartus
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD23
2 files changed, 12 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c5afb3589015..235c1dfab77b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = repoctl-devel-git
pkgdesc = A supplement to repo-add and repo-remove which simplifies managing local repositories (devel branch from git)
- pkgver = 0.20.r11.g1102d3c
+ pkgver = 0.21.r0.g92ed55f
pkgrel = 1
url = https://github.com/cassava/repoctl
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index f556ca847238..a40e0b14e749 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
# Maintainer: Pedro H Lara Campos <root@pedrohlc.com>
+# Contributor: bartus <szczepaniak.bartek+github@gmail.com>
# Contributor: Mark Wagie <mark.wagie@tutanota.com>
# Contributor: Alad Wenter <alad@mailbox.org>
# Contributor: Ben Morgan <neembi@gmail.com>
@@ -17,22 +18,14 @@ md5sums=('SKIP')
provides=('repoctl')
conflicts=('repoctl' 'repoctl-git')
-pkgver=0.20.r11.g1102d3c
+pkgver=0.21.r0.g92ed55f
pkgrel=1
pkgver() {
- cd "${_pkgname}"
- git describe --tags --long | sed 's/^v//; s/-/.r/; s/-/./g'
-}
-
-prepare() {
- dest="$srcdir/src/github.com/cassava"
- mkdir -p "$dest"
- ln -rTsf "$srcdir/${_pkgname}" "$dest/repoctl"
+ git -C "$srcdir/${_pkgname}" describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- src="$srcdir/src/github.com/cassava/repoctl"
- cd "$src/cmd/repoctl"
+ cd "${srcdir}/${_pkgname}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
export GOPATH="$srcdir"
@@ -44,12 +37,18 @@ package() {
# Install repoctl program
install -d "$pkgdir/usr/bin"
- install -m755 cmd/repoctl/repoctl "$pkgdir/usr/bin/"
+ install -m755 repoctl "$pkgdir/usr/bin/"
# Install other documentation
install -d "$pkgdir/usr/share/doc/repoctl"
install -m644 README.md NEWS.md "$pkgdir/usr/share/doc/repoctl/"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/repoctl/LICENSE"
+
+ # Generate completion files (spf13/cobra)
+ install -d "$pkgdir"/usr/share/{{bash-completion,fish}/completions,zsh/site-functions}
+ ./repoctl completion bash > "$pkgdir/usr/share/bash-completion/completions/repoctl"
+ ./repoctl completion zsh > "$pkgdir/usr/share/zsh/site-functions/_repoctl"
+ ./repoctl completion fish > "$pkgdir/usr/share/fish/completions/repoctl.fish"
}
# vim: set ts=2 sw=2: