blob: 748a527eb6e3aa09686d2592c50d588e133718eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: Adrian Lopez <zeioth@hotmail.com>
# Maintainer: txtsd <aur.archlinux@ihavea.quest>
pkgname=linux-command-gpt
pkgver=0.1.2
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')
depends=('glibc')
makedepends=('go')
conflicts=('linux-command-gpt-git')
source=("git+${url}#tag=v${pkgver}")
sha256sums=('SKIP')
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() {
cd "${pkgname}"
install -Dm755 "lcg" "${pkgdir}/usr/bin/lcg"
install -Dm755 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|