diff options
author | Jason Yip | 2023-06-18 10:53:06 -0700 |
---|---|---|
committer | Jason Yip | 2023-06-18 10:53:06 -0700 |
commit | 78eaaef0e3add5d0336d4f785c7ef319035048de (patch) | |
tree | f655e1a19194508bf773de02e1f7e730b6577219 | |
download | aur-78eaaef0e3add5d0336d4f785c7ef319035048de.tar.gz |
[INIT]
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 55 |
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..547d5e4feee7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = llm-clblast-git + pkgdesc = An ecosystem of Rust libraries for working with large language models (with CLBlast) + pkgver = r772.3becd72 + pkgrel = 1 + url = https://github.com/rustformers/llm + arch = any + license = MIT + license = APACHE + makedepends = git + makedepends = cargo + depends = glibc + depends = gcc-libs + depends = clblast + provides = llm + conflicts = llm + replaces = llama-cli + source = git+https://github.com/rustformers/llm + source = git+https://github.com/ggerganov/llama.cpp + sha256sums = SKIP + sha256sums = SKIP + +pkgname = llm-clblast-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a980af00afe5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!/.gitignore +!/PKGBUILD +!/.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a9497fee459f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Porous3247 <pqtb3v7t at jasonyip1 dot anonaddy dot me> +# Contributor: Asuka Minato <asukaminato at nyan dot eu dot org> + +_pkgname="llm" +_feature="clblast" +pkgname="${_pkgname}-${_feature}-git" +pkgver=r772.3becd72 +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}") +makedepends=(git cargo) +provides=("${_pkgname}") +conflicts=("${_pkgname}") +replaces=(llama-cli) +source=("git+${url}" + "git+https://github.com/ggerganov/llama.cpp" + ) +sha256sums=('SKIP' 'SKIP') + + +prepare() { + cd "${srcdir}/${_pkgname}" + git submodule init + git config submodule.crates/ggml/sys/llama-cpp.url "${srcdir}/llama.cpp" + git -c protocol.file.allow=always submodule update + export RUSTUP_TOOLCHAIN=stable + cargo update + cargo fetch --locked --target "${CARCH}-unknown-linux-gnu" + cat LICENSE-* > LICENSE +} + +pkgver() { + cd "${srcdir}/${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "${srcdir}/${_pkgname}" + RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target cargo build --frozen --release "--features=${_feature}" +} + +check () { + cd "${srcdir}/${_pkgname}" + RUSTUP_TOOLCHAIN=stable cargo test --frozen --all-features --workspace +} + +package() { + cd "${srcdir}/${_pkgname}" + install -Dm755 "target/release/${_pkgname}" -t "${pkgdir}/usr/bin/" + install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${_pkgname}/" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/" +} |