blob: 5f0de0a13884ad6475bb9c474abcc645f5ff562e (
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
52
|
# Maintaner: blob42 <contact@blob42.xyz>
pkgname=aichat-ng
pkgver=0.19.0
pkgrel=1
pkgdesc="OpenAI, ChatGPT, ollama and more in your terminal"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/blob42/aichat-ng"
license=('AGPL3')
depends=('gcc-libs')
makedepends=('cargo' 'mold')
conflicts=('aichat-bin' 'aichat-git' 'aichat')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('6af85a193524fb9b0036bdeae7d66e38fe39604de8291197a63f3f23c5c3408c')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export RUSTFLAGS="$RUSTFLAGS \
-C link-arg=-fuse-ld=mold"
cargo build --release --frozen
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/$pkgname" -T "$pkgdir/usr/bin/aichat"
install -Dm 644 "README.md" -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 "LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}
|