diff options
author | Jason Yip | 2024-04-07 09:56:35 -0500 |
---|---|---|
committer | Jason Yip | 2024-04-07 09:57:14 -0500 |
commit | 1f586384c86bd4f3cc085599c1d7cd102f139d00 (patch) | |
tree | 2893b1c99a81a4a228420165ddd3c6df76a7211c /PKGBUILD | |
parent | 668805a3675e64fcbe08cdeb5b2921e6f65c4fa8 (diff) | |
download | aur-llm.tar.gz |
refactor: implement suggestions by dreieck
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -3,12 +3,12 @@ pkgname="llm" pkgver=0.1.1 -pkgrel=4 +pkgrel=5 epoch= pkgdesc="Run inference for Large Language Models on CPU, with Rust 🦀🚀🦙" arch=(any) url="https://github.com/rustformers/${pkgname}" -license=('MIT' 'APACHE') +license=('Apache-2.0 OR MIT') depends=(glibc gcc-libs) makedepends=(git cargo) provides=(llm) @@ -17,6 +17,7 @@ source=("git+${url}#tag=v${pkgver}" "git+https://github.com/ggerganov/ggml" ) sha256sums=('SKIP' 'SKIP') +options+=('!lto') prepare() { @@ -24,12 +25,24 @@ prepare() { git submodule init git config submodule.crates/ggml/sys/ggml.url "${srcdir}/ggml" git -c protocol.file.allow=always submodule update + + cat LICENSE-* > LICENSE + + export RUSTUP_TOOLCHAIN=stable + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd "${srcdir}/${pkgname}" - cat LICENSE-* > LICENSE - cargo build --release + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release +} + +check() { + cd "${srcdir}/${pkgname}" + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features } package() { |