blob: 2fd90900daf14d80da51a8c38d4cb83240b26d08 (
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
40
41
42
43
44
45
46
47
48
49
50
51
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=a-gpt-git
_pkgname=a
pkgver=r58.dece782
pkgrel=1
pkgdesc="A CLI tool to generate code from GPT3 (git)"
arch=('x86_64')
url="https://github.com/ddddddeon/a"
license=('MIT')
depends=('libxcb' 'libxkbcommon')
makedepends=('cargo' 'git')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
source=("git+${url}")
sha512sums=('SKIP')
options=('!lto')
pkgver() {
cd "${_pkgname}"
( set -o pipefail
git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}
prepare() {
cd "${_pkgname}"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --frozen
}
check() {
cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --bins
}
package() {
cd "${_pkgname}"
install -Dm 755 "target/release/${_pkgname}" -t "${pkgdir}/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|