blob: 3659a5e0e0c242d58673238c27fa77a424ef5f75 (
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
|
# Maintainer: crashdummy
# Shamelessly stolen from the aur package of luciddream
# https://aur.archlinux.org/packages/lemonade-server
pkgname=lemonade-server-git
pkgdesc="Lemonade: Local LLM Serving with GPU and NPU acceleration (Server)"
epoch=1
pkgver=r1144.6660fd3e
pkgrel=1
arch=('x86_64')
url='https://github.com/lemonade-sdk/lemonade/'
license=('Apache-2.0')
makedepends=('cmake' 'ninja' 'git' 'cli11' 'nlohmann-json' 'openssl')
depends=('zstd' 'curl' 'libwebsockets')
provides=('lemonade-server')
conflicts=('lemonade-server')
backup=('etc/lemonade/lemonade.conf' 'etc/lemonade/secrets.conf')
_commit=6660fd3e833647f5291a3ea36776e3036b5b9e33
_httplibver=0.37.1
source=(
"lemonade-${_commit}.tar.gz::https://github.com/lemonade-sdk/lemonade/archive/${_commit}.tar.gz"
"httplib-${_httplibver}.tar.gz::https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${_httplibver}.tar.gz"
sysusers.conf
tmpfiles.conf
)
sha256sums=(
'18c94383488cc94bebc790d044fa0947b6d63c61768c3a569b7f4c077d04fa40'
'294776b99d51860881210624b187b64bae7c451c615ea0c6befb8d9d24a139a0'
'069d5612d570e83128d7eed7ffe4525943d75d22b9c84537d861833157e74b26'
'f7353d20f265fbdda9121e8587443cef95ba5fb89e1704a87920876ce966804b'
)
build() {
local _cores=8
if (( $(nproc) < 8 )); then
_cores=$(nproc)
fi
echo "Building with ${_cores} cores"
local cmake_options=(
-B build
-G Ninja
-S "lemonade-${_commit}"
-W no-dev
-D FETCHCONTENT_FULLY_DISCONNECTED=ON
-D FETCHCONTENT_SOURCE_DIR_HTTPLIB="${srcdir}/cpp-httplib-${_httplibver}"
-D CMAKE_BUILD_TYPE=None
-D CMAKE_INSTALL_PREFIX=/usr
)
cmake "${cmake_options[@]}"
cmake --build build --parallel ${_cores}
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -dm0755 "${pkgdir}"/var/lib/lemonade
install -dm0755 "${pkgdir}"/etc/lemonade
install -vDm644 "${srcdir}/sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/lemonade-server.conf"
install -vDm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/lemonade-server.conf"
}
|