blob: 3f6803733653abccc583457470106dce621479f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Maintainer: robertfoster
pkgname=llama.cpp-git
pkgver=master.ac7876a
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=()
makedepends=('cmake' 'git')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}")
pkgver() {
cd "${srcdir}/${pkgname%-git}"
printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
cd "${srcdir}/${pkgname%-git}"
cmake -B ./build \
-S . \
-DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" \
-DCMAKE_BUILD_TYPE=Release
cmake --build ./build
}
package() {
cd "${srcdir}/${pkgname%-git}"
cmake --install ./build
for i in build/bin/*; do
install -Dm755 "${i}" \
"${pkgdir}/usr/bin/${pkgname%-git}-${i//build\/bin\//}"
done
mv "${pkgdir}/usr/bin/${pkgname%-git}-main" \
"${pkgdir}/usr/bin/${pkgname%-git}"
}
sha256sums=('SKIP')
|