blob: 2332120e2f27ce6a08b56e987f673c3d14833e39 (
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.22.1
pkgrel=1
pkgdesc="OpenAI, ChatGPT, ollama and more in your terminal. Fork with advanced features."
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=('3bdb008c52f73012d3742f70a0738d481563e53e37af2d0723f2bd60077918ae')
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"
}
|