diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 63 |
3 files changed, 50 insertions, 36 deletions
@@ -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.* @@ -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" } + |