summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortxtsd2023-03-20 00:19:44 +0530
committertxtsd2023-03-20 00:20:37 +0530
commitf7174f352c3eed74b88a413a62b8892298aba378 (patch)
treee5c816e760174f4e7b532baa2bf4e2f882c3f30e
parente9e68a9449a0871b54c1a571615c953bf89cf445 (diff)
downloadaur-f7174f352c3eed74b88a413a62b8892298aba378.tar.gz
upgpkg: linux-command-gpt 0.1.2-5
Signed-off-by: txtsd <code@ihavea.quest>
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD57
3 files changed, 43 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 867b618f1a1b..03881847dc90 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
pkgbase = linux-command-gpt
- pkgdesc = Get Linux commands in natural language with the power of ChatGPT.
+ pkgdesc = Get Linux commands in natural language with the power of ChatGPT
pkgver = 0.1.2
- pkgrel = 4
- url = https://github.com/asrul10/linux-command-gpt.git
- arch = any
+ pkgrel = 5
+ url = https://github.com/asrul10/linux-command-gpt
+ arch = x86_64
+ arch = aarch64
license = MIT
makedepends = go
- depends = go
- provides = linux-command-gpt
+ depends = glibc
conflicts = linux-command-gpt-git
- source = git+https://github.com/asrul10/linux-command-gpt.git#commit=952eee1a29219839df0c7fb2f442e60d41163551
+ source = git+https://github.com/asrul10/linux-command-gpt#tag=v0.1.2
sha256sums = SKIP
pkgname = linux-command-gpt
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..1dad07c5aff1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+
+*.pkg.*
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index 12b842403651..748a527eb6e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,39 @@
# Maintainer: Adrian Lopez <zeioth@hotmail.com>
+# Maintainer: txtsd <aur.archlinux@ihavea.quest>
+
pkgname=linux-command-gpt
pkgver=0.1.2
-pkgrel=4
-epoch=
-pkgdesc="Get Linux commands in natural language with the power of ChatGPT."
-arch=(any)
-url="https://github.com/asrul10/linux-command-gpt.git"
+pkgrel=5
+pkgdesc='Get Linux commands in natural language with the power of ChatGPT'
+arch=('x86_64' 'aarch64')
+url='https://github.com/asrul10/linux-command-gpt'
license=('MIT')
-groups=()
-depends=(go)
-makedepends=(go)
-checkdepends=()
-optdepends=()
-provides=(linux-command-gpt)
-conflicts=(linux-command-gpt-git)
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("git+$url#commit=952eee1a29219839df0c7fb2f442e60d41163551")
-noextract=()
+depends=('glibc')
+makedepends=('go')
+conflicts=('linux-command-gpt-git')
+source=("git+${url}#tag=v${pkgver}")
sha256sums=('SKIP')
-validpgpkeys=()
+
+build() {
+ cd "${pkgname}"
+ # https://wiki.archlinux.org/index.php/Go_package_guidelines
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOPATH="${srcdir}/go"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o lcg
+}
+
+check() {
+ cd "${pkgname}"
+ go test ./...
+}
package() {
- # Compile stable version
- cd "${srcdir}"/linux-command-gpt
- go build -o lcg
-
- # Add it to /usr/bin to make it executable
- install -Dm755 "${srcdir}/linux-command-gpt/lcg" "${pkgdir}/usr/bin/lcg"
+ cd "${pkgname}"
+ install -Dm755 "lcg" "${pkgdir}/usr/bin/lcg"
+ install -Dm755 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+