summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjguer2022-06-17 16:20:56 +0200
committerjguer2022-06-17 16:20:56 +0200
commit39e4bd6701f0b1217cd3bbd9b962a1e1ccc9590a (patch)
tree33fdb775e6cc33ec0a9941053d1ae4b687b68ebc
downloadaur-39e4bd6701f0b1217cd3bbd9b962a1e1ccc9590a.tar.gz
add aur-cli-git
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD52
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3ec015acd60d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = aur-cli-git
+ pkgdesc = Client for simple AUR queries
+ pkgver = 1.0.1.r0.gdd2242f
+ pkgrel = 1
+ url = https://github.com/Jguer/votar
+ arch = i686
+ arch = pentium4
+ arch = x86_64
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = GPL3
+ makedepends = go
+ provides = aur-cli
+ conflicts = aur-cli
+ source = aur-cli::git+https://github.com/Jguer/aur.git#branch=master
+ sha256sums = SKIP
+
+pkgname = aur-cli-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..52c70936e9f7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/*.tar.xz
+/*.tar.gz
+/*.tar.zst
+/pkg
+/src
+/aur-cli
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b0b4a79a864f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Jguer <pkgbuilds at jguer.space>
+pkgname="aur-cli-git"
+_pkgname="aur-cli"
+pkgver=1.0.1.r0.gdd2242f
+pkgrel=1
+pkgdesc="Client for simple AUR queries"
+arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/Jguer/votar"
+license=('GPL3')
+makedepends=('go')
+conflicts=('aur-cli')
+provides=('aur-cli')
+source=("aur-cli::git+https://github.com/Jguer/aur.git#branch=master")
+sha256sums=("SKIP")
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare(){
+ cd "$srcdir/$_pkgname"
+ mkdir -p build
+}
+
+check() {
+ cd "$srcdir/$_pkgname"
+ go test ./...
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+ 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=readonly -modcacherw"
+
+ # or alternatively you can define some of these flags from the CLI options
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ -o build ./cmd/aur-cli
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ install -Dm755 build/$_pkgname "$pkgdir"/usr/bin/$_pkgname
+}