summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Yip2024-04-07 10:15:55 -0500
committerJason Yip2024-04-07 10:15:55 -0500
commit15e7322dd11eb21e2bd9360dcb36821442967e1e (patch)
tree926fd1f625be9ad392886b34e5348b9323cceb9d
parent9989979cbb0c71217508b8106a139a038a1b39f5 (diff)
downloadaur-llm-git.tar.gz
refactor: use standard patterns in Arch Rust PKGBUILDs
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD22
2 files changed, 17 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1e66530706fe..77cbbc7b81fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,10 @@
pkgbase = llm-git
pkgdesc = An ecosystem of Rust libraries for working with large language models
- pkgver = 0.1.1.r429.gfc1c052
+ pkgver = 0.1.1.r592.g9376078
pkgrel = 1
url = https://github.com/rustformers/llm
arch = any
- license = MIT
- license = APACHE
+ license = Apache-2.0 OR MIT
makedepends = git
makedepends = cargo
depends = glibc
@@ -13,6 +12,7 @@ pkgbase = llm-git
provides = llm
conflicts = llm
replaces = llama-cli
+ options = !lto
source = git+https://github.com/rustformers/llm
source = git+https://github.com/ggerganov/llama.cpp
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 6597429b5581..d9d0bc0ac674 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,21 +3,22 @@
_pkgname="llm"
pkgname="${_pkgname}-git"
-pkgver=0.1.1.r429.gfc1c052
+pkgver=0.1.1.r592.g9376078
pkgrel=1
pkgdesc="An ecosystem of Rust libraries for working with large language models"
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)
-conflicts=(llm)
+provides=("$_pkgname")
+conflicts=("$_pkgname")
replaces=(llama-cli)
source=("git+${url}"
"git+https://github.com/ggerganov/llama.cpp"
)
sha256sums=('SKIP' 'SKIP')
+options+=('!lto')
prepare() {
@@ -25,10 +26,12 @@ prepare() {
git submodule init
git config submodule.crates/ggml/sys/llama-cpp.url "${srcdir}/llama.cpp"
git -c protocol.file.allow=always submodule update
+
+ cat LICENSE-* > LICENSE
+
export RUSTUP_TOOLCHAIN=stable
cargo update
- cargo fetch --locked --target "${CARCH}-unknown-linux-gnu"
- cat LICENSE-* > LICENSE
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
pkgver() {
@@ -38,12 +41,15 @@ pkgver() {
build() {
cd "${srcdir}/${_pkgname}"
- RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target cargo build --frozen --release --bin llm
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release
}
check () {
cd "${srcdir}/${_pkgname}"
- RUSTUP_TOOLCHAIN=stable cargo test --frozen --workspace
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
}
package() {