summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7e06e7ce3382f99ccfe97ed5e1dc92e04945a24 (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: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=local-llama-bin
_pkgname="Local Llama"
pkgver=1.0.2
_electronversion=31
pkgrel=1
pkgdesc="Local Llama also known as L³ is designed to be easy to use, with a user-friendly interface and advanced settings."
arch=('x86_64')
url="https://folio.tib0.com/"
_ghurl="https://github.com/tib0/local-llama"
license=('CC-BY-NC-ND-4.0')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    "electron${_electronversion}"
    'vulkan-icd-loader'
    'nodejs'
)
options=(
    '!strip'
    '!emptydirs'
)
source=(
    "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/${pkgver}/Linux.${pkgname%-bin}.deb"
    "${pkgname%-bin}.sh"
)
sha256sums=('82314c7b807af2440a8653795e0844737a9d5bd59e67774db69dfdc85c1b0383'
            '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
    sed -e "
        s/@electronversion@/${_electronversion}/g
        s/@appname@/${pkgname%-bin}/g
        s/@runname@/app/g
        s/@cfgdirname@/${pkgname%-bin}/g
        s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
    " -i "${srcdir}/${pkgname%-bin}.sh"
    bsdtar -xf "${srcdir}/data."*
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
    cp -r "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
    install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/usr/share/pixmaps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
    install -Dm644 "${srcdir}/usr/share/doc/${pkgname%-bin}/copyright" "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
}