summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-09-01 10:27:23 +0200
committerbartus2020-09-01 10:27:23 +0200
commit0f1fd5aadd48d78919b345b2c4b66709c293a829 (patch)
tree6bdd42fd275391a1c7aa5fa36df48df8d95d50d8
parentb69223404351d18318582671093f5850e2e070f8 (diff)
downloadaur-repoctl-git.tar.gz
Renormalize PKGBUILD.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD58
2 files changed, 40 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 55d2bb22d57a..a612a4a61455 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = repoctl-git
- pkgdesc = A supplement to repo-add and repo-remove which simplifies managing local repositories
- pkgver = 0.16.r39.g717a4e1
+ pkgdesc = An AUR helper that also simplifies managing local Pacman repositories (development version)
+ pkgver = 0.21.r0.g92ed55f
pkgrel = 1
url = https://github.com/cassava/repoctl
arch = i686
arch = x86_64
arch = armv7h
+ arch = aarch64
license = MIT
makedepends = go
+ makedepends = xz
makedepends = git
depends = pacman
provides = repoctl
diff --git a/PKGBUILD b/PKGBUILD
index dcd105433225..13edb1df9fb7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,16 +2,17 @@
# Contributor: Alad Wenter <alad@mailbox.org>
# Contributor: Ben Morgan <neembi@gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: bartus <arch-user-repo\at\bartus.33mail.com>
pkgname=repoctl-git
-pkgver=0.16.r39.g717a4e1
+pkgver=0.21.r0.g92ed55f
pkgrel=1
-pkgdesc="A supplement to repo-add and repo-remove which simplifies managing local repositories"
-arch=('i686' 'x86_64' 'armv7h')
+pkgdesc="An AUR helper that also simplifies managing local Pacman repositories (development version)"
+arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/cassava/repoctl"
license=('MIT')
depends=('pacman')
-makedepends=('go' 'git')
+makedepends=('go' 'xz' 'git')
conflicts=('repoctl')
provides=('repoctl')
source=("$pkgname::git+https://github.com/cassava/repoctl.git")
@@ -23,33 +24,46 @@ pkgver() {
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
-prepare() {
- dest="$srcdir/src/github.com/cassava"
- mkdir -p "$dest"
- mv "$srcdir/$pkgname" "$dest/repoctl"
- cd "$srcdir"
- ln -s "$dest/repoctl" "$pkgname"
-}
build() {
- src="$srcdir/src/github.com/cassava/repoctl"
- cd "$src/cmd/repoctl"
- GOPATH="$srcdir" go build
+ cd "$srcdir/${pkgname}"
+
+ # Respect system build options
+ export GOPATH="${srcdir}/gopath"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=vendor -modcacherw"
+
+ # Build the binary
+ go build -v -o "${pkgname%-git}"
+
+ # Generate the completion files
+ ./repoctl completion zsh > completion.zsh
+ ./repoctl completion bash > completion.bash
+ ./repoctl completion fish > completion.fish
+}
+
+check() {
+ cd "$srcdir/$pkgname"
+ go test ./...
}
package() {
cd "$srcdir/$pkgname"
# Install repoctl program
- install -d "$pkgdir/usr/bin"
- install -m755 cmd/repoctl/repoctl "$pkgdir/usr/bin/"
+ install -Dm755 repoctl "${pkgdir}/usr/bin/repoctl"
- # 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"
+ # Install documentation files
+ 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"
# Install completion files
- install -Dm644 contrib/repoctl_completion.zsh "$pkgdir/usr/share/zsh/site-functions/_repoctl"
- install -Dm644 contrib/repoctl_completion.bash "$pkgdir/usr/share/bash-completion/completions/repoctl"
+ install -Dm644 completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_repoctl"
+ install -Dm644 completion.bash "${pkgdir}/usr/share/bash-completion/completions/repoctl"
+ install -Dm644 completion.fish "${pkgdir}/usr/share/fish/vendor_completions.d/repoctl.fish"
}
+