Skip to content

Commit f3aca60

Browse files
committed
sync
1 parent 197dfc7 commit f3aca60

6 files changed

Lines changed: 121 additions & 2 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[chromium-widevine]
2-
source='cmd'
3-
cmd='curl https://dl.google.com/widevine-cdm/versions.txt | tail -n 1'
2+
source = 'cmd'
3+
cmd = 'curl https://dl.google.com/widevine-cdm/versions.txt | tail -n 1'

maintain/build/llama.cpp/.SRCINFO

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
pkgbase = llama.cpp
2+
pkgdesc = Port of Facebook's LLaMA model in C/C++
3+
pkgver = b6039
4+
pkgrel = 1
5+
url = https://github.com/ggerganov/llama.cpp
6+
arch = x86_64
7+
arch = armv7h
8+
arch = aarch64
9+
license = MIT
10+
makedepends = cmake
11+
makedepends = git
12+
depends = curl
13+
depends = gcc-libs
14+
depends = glibc
15+
depends = python
16+
depends = python-numpy
17+
depends = python-sentencepiece
18+
optdepends = python-pytorch
19+
conflicts = libggml
20+
conflicts = ggml
21+
options = lto
22+
options = !debug
23+
source = git+https://github.com/ggerganov/llama.cpp#tag=b6039
24+
source = llama.cpp.conf
25+
source = llama.cpp.service
26+
sha256sums = c12620a1337446f1dad32e4dbf9b0670fd82ec4085b3fd95d6facb2adb48ca3d
27+
sha256sums = 53fa70cfe40cb8a3ca432590e4f76561df0f129a31b121c9b4b34af0da7c4d87
28+
sha256sums = 0377d08a07bda056785981d3352ccd2dbc0387c4836f91fb73e6b790d836620d
29+
30+
pkgname = llama.cpp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[llama.cpp]
2+
source = "git"
3+
git = "https://github.com/ggerganov/llama.cpp.git"
4+
include_regex = "b\\d+"

maintain/build/llama.cpp/PKGBUILD

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Maintainer: envolution
2+
# Contributor: txtsd <aur.archlinux@ihavea.quest>
3+
# shellcheck shell=bash disable=SC2034,SC2154
4+
5+
pkgname=llama.cpp
6+
pkgver=b6039
7+
pkgrel=1
8+
pkgdesc="Port of Facebook's LLaMA model in C/C++"
9+
arch=(x86_64 armv7h aarch64)
10+
url='https://github.com/ggerganov/llama.cpp'
11+
license=('MIT')
12+
depends=(
13+
curl
14+
gcc-libs
15+
glibc
16+
)
17+
makedepends=(
18+
cmake
19+
)
20+
optdepends=(
21+
'python-numpy: needed for convert_hf_to_gguf.py'
22+
'python-safetensors: needed for convert_hf_to_gguf.py'
23+
'python-sentencepiece: needed for convert_hf_to_gguf.py'
24+
'python-pytorch: needed for convert_hf_to_gguf.py'
25+
'python-transformers: needed for convert_hf_to_gguf.py'
26+
)
27+
conflicts=(libggml ggml)
28+
source=(
29+
"${pkgname}-${pkgver}.tar.gz::https://github.com/ggml-org/llama.cpp/archive/refs/tags/${pkgver}.tar.gz"
30+
llama.cpp.conf
31+
llama.cpp.service
32+
)
33+
sha256sums=('c6fd7993b4c7ba3d01bd6ec7e85b518c205a2d3453150d1791b04cde29b27da1'
34+
'53fa70cfe40cb8a3ca432590e4f76561df0f129a31b121c9b4b34af0da7c4d87'
35+
'0377d08a07bda056785981d3352ccd2dbc0387c4836f91fb73e6b790d836620d')
36+
37+
prepare(){
38+
ln -sf "${pkgname}-${pkgver}" llama.cpp
39+
}
40+
build() {
41+
local _cmake_options=(
42+
-B build
43+
-S "${pkgname}"
44+
-DCMAKE_BUILD_TYPE=Release
45+
-DCMAKE_INSTALL_PREFIX='/usr'
46+
-DBUILD_SHARED_LIBS=ON
47+
-DLLAMA_CURL=ON
48+
-DLLAMA_BUILD_TESTS=OFF
49+
-DLLAMA_USE_SYSTEM_GGML=OFF
50+
-DGGML_ALL_WARNINGS=OFF
51+
-DGGML_ALL_WARNINGS_3RD_PARTY=OFF
52+
-DGGML_BUILD_EXAMPLES=OFF
53+
-DGGML_BUILD_TESTS=OFF
54+
-DGGML_LTO=ON
55+
-DGGML_RPC=ON
56+
-DGGML_BLAS=OFF
57+
-Wno-dev
58+
)
59+
cmake "${_cmake_options[@]}"
60+
cmake --build build
61+
}
62+
63+
package() {
64+
DESTDIR="${pkgdir}" cmake --install build
65+
66+
install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
67+
68+
install -Dm644 "llama.cpp.conf" "${pkgdir}/etc/conf.d/llama.cpp"
69+
install -Dm644 "llama.cpp.service" "${pkgdir}/usr/lib/systemd/system/llama.cpp.service"
70+
}
71+
# vim:set ts=2 sw=2 et:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LLAMA_ARGS=""
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=llama.cpp Server
3+
After=syslog.target network.target local-fs.target remote-fs.target nss-lookup.target
4+
5+
[Service]
6+
Type=simple
7+
EnvironmentFile=/etc/conf.d/llama.cpp
8+
ExecStart=/usr/bin/llama-server $LLAMA_ARGS
9+
ExecReload=/bin/kill -s HUP $MAINPID
10+
Restart=on-failure
11+
12+
[Install]
13+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)