blob: 98edbd95cbba949612cf5944a722f116308c9e6c (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Maintainer: TheBill2001 <tuantran1632001 at gmail dot com>
# Contributer: Alpin <alpin 'at' alpindale 'dot' dev>
# Author: LostRuins (concedo)
# Build configuration could be change with environment variables.
# Or via `${XDG_CONFIG_HOME}/koboldcpp_build.conf` (default is `~/.config/koboldcpp_build.conf`).
#
# Disabling portable build
# KOBOLDCPP_NO_PORTABLE:
# '0' - Keep portable build enabled (default)
# '1' or any other value that isn't '0' - Disable portable build.
: ${KOBOLDCPP_BUILD_CONF:=${XDG_CONFIG_HOME:-~/.config}/koboldcpp_build.conf}
: ${KOBOLDCPP_NO_PORTABLE:=0}
pkgname=koboldcpp
pkgver=1.80
pkgrel=1
pkgdesc="An easy-to-use AI text-generation software for GGML and GGUF models"
arch=('x86_64')
url="https://github.com/LostRuins/koboldcpp"
license=('AGPL-3.0-only')
depends=(
'python'
'cblas'
'clblast'
'vulkan-icd-loader'
)
optdepends=(
'python-customtkinter: for GUI launcher'
'python-psutil: increasing the process CPU priority'
)
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/LostRuins/koboldcpp/archive/refs/tags/v$pkgver.tar.gz"
'koboldcpp.desktop'
'koboldcpp.png'
)
sha256sums=(
'363d973ad6e476e7817784322d3029b1b9b1a307d6d7094aa67f9525a25259f7'
'fcec7b843b908e1c03496fdc0605e6509f52526a855c43db16e287ef646503ef'
'd244788c74a693a383bea7db6ab2bb2f762e6020de900be977b16e18dcd20f54'
)
build() {
if [ -f "${KOBOLDCPP_BUILD_CONF}" ]; then
echo "Using config from ${KOBOLDCPP_BUILD_CONF}"
source "${KOBOLDCPP_BUILD_CONF}"
fi
if [ "${KOBOLDCPP_NO_PORTABLE}" == "0" ]; then
export LLAMA_PORTABLE=1
fi
export LLAMA_VULKAN=1
export LLAMA_CLBLAST=1
cd "$srcdir/koboldcpp-$pkgver"
make clean && make
}
package() {
cd "$srcdir/koboldcpp-$pkgver"
install -d "$pkgdir/usr/share/koboldcpp"
install -Dm644 ./*.so "$pkgdir/usr/share/koboldcpp/"
install -Dm644 ./*.embd "$pkgdir/usr/share/koboldcpp/"
install -d "$pkgdir/usr/share/koboldcpp/kcpp_adapters"
install -m644 "kcpp_adapters"/* "$pkgdir/usr/share/koboldcpp/kcpp_adapters/"
install -Dm644 "koboldcpp.py" "$pkgdir/usr/share/koboldcpp/koboldcpp.py"
echo '#!/bin/sh' > koboldcpp
echo 'python /usr/share/koboldcpp/koboldcpp.py "$@"' >> koboldcpp
install -Dm755 koboldcpp "$pkgdir/usr/bin/koboldcpp"
install -Dm644 "$srcdir/koboldcpp.desktop" "$pkgdir/usr/share/applications/koboldcpp.desktop"
install -Dm644 "$srcdir/koboldcpp.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/koboldcpp.png"
}
|