summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Yip2024-04-07 10:15:36 -0500
committerJason Yip2024-04-07 10:15:36 -0500
commit1742dd24dc993ec23629199f0adb27ac87ac82c9 (patch)
tree98ac6c27d1943148006272155c102e8d843b6f02
parent768fd44ed84bf881d46d5461ed0e0a5f90be483b (diff)
downloadaur-llm-clblast-git.tar.gz
refactor: use standard patterns in Arch Rust PKGBUILDs
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD20
2 files changed, 16 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 532d798f7b9f..8d1136e2c1c9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,10 @@
pkgbase = llm-clblast-git
pkgdesc = An ecosystem of Rust libraries for working with large language models (with CLBlast)
- 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
@@ -14,6 +13,7 @@ pkgbase = llm-clblast-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 f14dc6f1b163..e9d11a9a3aad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,13 +4,13 @@
_pkgname="llm"
_feature="clblast"
pkgname="${_pkgname}-${_feature}-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 (with CLBlast)"
arch=(any)
url="https://github.com/rustformers/${_pkgname}"
-license=('MIT' 'APACHE')
-depends=(glibc gcc-libs "${_feature}")
+license=('Apache-2.0 OR MIT')
+depends=(glibc gcc-libs "$_feature")
makedepends=(git cargo)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
@@ -19,6 +19,7 @@ source=("git+${url}"
"git+https://github.com/ggerganov/llama.cpp"
)
sha256sums=('SKIP' 'SKIP')
+options+=('!lto')
prepare() {
@@ -26,10 +27,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() {
@@ -39,12 +42,15 @@ pkgver() {
build() {
cd "${srcdir}/${_pkgname}"
- RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target cargo build --frozen --release "--features=${_feature}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --features="${_feature}"
}
check () {
cd "${srcdir}/${_pkgname}"
- RUSTUP_TOOLCHAIN=stable cargo test --frozen --workspace "--features=${_feature}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
}
package() {