summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortxtsd2023-03-20 00:26:26 +0530
committertxtsd2023-03-20 00:28:10 +0530
commitb90863140e6ab690f116d9fe0953f91514cde7af (patch)
treec0d7cb5f7719fcb60e3e2432dab1ac5f411970a9
parent4557100d90e15b268ea1340ebd586c0944dcc50b (diff)
downloadaur-b90863140e6ab690f116d9fe0953f91514cde7af.tar.gz
upgpkg: linux-command-gpt-git v0.1.2.r0.g952eee1-1
Follow best practices Signed-off-by: txtsd <code@ihavea.quest>
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD63
3 files changed, 50 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dca327823ba3..98b88c0a4171 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = linux-command-gpt-git
- pkgdesc = Get Linux commands in natural language with the power of ChatGPT.
- pkgver = 1.0.r6.59125fa
- pkgrel = 2
- url = https://github.com/asrul10/linux-command-gpt.git
- arch = any
+ pkgdesc = Get Linux commands in natural language with the power of ChatGPT
+ pkgver = v0.1.2.r0.g952eee1
+ pkgrel = 1
+ url = https://github.com/asrul10/linux-command-gpt
+ arch = x86_64
+ arch = aarch64
license = MIT
makedepends = go
- depends = go
- provides = linux-command-gpt-git
+ depends = glibc
+ provides = linux-command-gpt
conflicts = linux-command-gpt
- source = git+https://github.com/asrul10/linux-command-gpt.git
+ source = git+https://github.com/asrul10/linux-command-gpt
sha256sums = SKIP
pkgname = linux-command-gpt-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a137e308b48c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg/
+src/
+linux-command-gpt/
+
+*.pkg.*
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index aedf0ae57cf3..336b65f78f57 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,46 @@
# Maintainer: Adrian Lopez <zeioth@hotmail.com>
+# Maintainer: txtsd <aur.archlinux@ihavea.quest>
+
pkgname=linux-command-gpt-git
-pkgver=1.0.r6.59125fa
-pkgrel=2
-epoch=
-pkgdesc="Get Linux commands in natural language with the power of ChatGPT."
-arch=(any)
-url="https://github.com/asrul10/linux-command-gpt.git"
+_pkgname=linux-command-gpt
+pkgver=v0.1.2.r0.g952eee1
+pkgrel=1
+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-git)
-conflicts=(linux-command-gpt)
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("git+$url")
-noextract=()
+depends=('glibc')
+makedepends=('go')
+provides=('linux-command-gpt')
+conflicts=('linux-command-gpt')
+source=("git+${url}")
sha256sums=('SKIP')
-validpgpkeys=()
pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+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}"
- printf "1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ go test ./...
}
package() {
- # Compile
- 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"
}
+