diff options
author | robertfoster | 2025-04-12 13:49:46 +0000 |
---|---|---|
committer | robertfoster | 2025-04-12 13:49:46 +0000 |
commit | b62a3e42a13b4308f62f2498025c86342431c00b (patch) | |
tree | 3c1176e488f1908b2409ec15360fd9ff4293ca86 /PKGBUILD | |
parent | c1c1a31287feff445043db5fcae7000c9933d0bc (diff) | |
download | aur-b62a3e42a13b4308f62f2498025c86342431c00b.tar.gz |
Update PKGBUILD and .SRCINFO with GitHub Actions
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 50 |
1 files changed, 26 insertions, 24 deletions
@@ -1,59 +1,58 @@ # Maintainer: robertfoster pkgname=llama.cpp-git -pkgver=b4082.r11.4047be74d +pkgver=b5123 pkgrel=1 pkgdesc="Port of Facebook's LLaMA model in C/C++" arch=('armv7h' 'aarch64' 'x86_64') url="https://github.com/ggerganov/llama.cpp" license=("MIT") -depends=('openblas' - 'openblas64') +depends=('openblas') makedepends=( 'cmake' 'git' - 'openblas' - 'openblas64' ) -conflicts=("llama.cpp") -provides=("llama.cpp") -source=("llama.cpp::git+${url}" +optdepends=( + 'python-gguf: convert_hf_to_gguf python script' + 'python-numpy: convert_hf_to_gguf.py python script' + 'python-pytorch: convert_hf_to_gguf.py python script' +) +conflicts=("${pkgname%%-git}") +provides=("${pkgname%%-git}") +source=("${pkgname%%-git}::git+${url}" "kompute::git+https://github.com/nomic-ai/kompute.git" - "llama.cpp.conf" - "llama.cpp.service" + "${pkgname%%-git}.conf" + "${pkgname%%-git}.service" ) pkgver() { - cd "${srcdir}/llama.cpp" + cd "${srcdir}/${pkgname%%-git}" printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" } prepare() { - cd "${srcdir}/llama.cpp" + cd "${srcdir}/${pkgname%%-git}" git submodule init git config submodule.kompute.url "${srcdir}/kompute" git -c protocol.file.allow=always submodule update } build() { - local _cmake_args=( - -B build - -S . - -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_BUILD_TYPE=Release - -DGGML_BLAS=ON - -DGGML_BLAS_VENDOR=OpenBLAS - ) + cmake \ + -B "${srcdir}/build" \ + -S "${srcdir}/${pkgname%%-git}" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DGGML_BLAS=1 \ + -DGGML_BLAS_VENDOR=OpenBLAS \ + -DLLAMA_BUILD_TESTS=0 - cd "${srcdir}/llama.cpp" - cmake "${_cmake_args[@]}" cmake --build build } package() { - cd "${srcdir}/llama.cpp" - DESTDIR="${pkgdir}" cmake --install build + DESTDIR="${pkgdir}" cmake --install "${srcdir}/build" # systemd install -D -m644 "${srcdir}/llama.cpp.conf" \ @@ -62,6 +61,9 @@ package() { -t "${pkgdir}/usr/lib/systemd/system" rm "${pkgdir}/usr/include/"ggml* + + install -Dm644 "${srcdir}/${pkgname%%-git}/LICENSE" \ + -t "${pkgdir}/usr/share/licenses/${pkgname}" } sha256sums=('SKIP' |