summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 5 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 21b6ce01b85..63eb89651c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,7 @@
pkgname=beancount-language-server-git
_pkgname=beancount-language-server
-_npmname=beancount-langserver
-pkgver=r89.73bfbd1
+pkgver=r109.179c798
pkgrel=1
pkgdesc="A Language Server Protocol (LSP) for beancount files"
arch=('any')
@@ -11,7 +10,7 @@ url="https://github.com/polarmutex/beancount-language-server"
conflicts=('beancount-language-server')
provides=('beancount-language-server')
license=('MIT')
-depends=('nodejs' 'python' 'beancount')
+depends=('cargo' 'beancount')
makedepends=('npm' 'git')
source=("git+${url}.git")
sha512sums=('SKIP')
@@ -23,23 +22,11 @@ pkgver() {
build() {
cd "${srcdir}/${_pkgname}"
- npm install
- npm run compile
- npm prune --production
+ cargo build --release --target-dir=target
}
package() {
- local _npmdir="${pkgdir}/usr/lib/${_pkgname}"
-
cd "${srcdir}/${_pkgname}"
- install -Ddm755 "${_npmdir}"
- cp -r --no-preserve=ownership out node_modules package.json tree-sitter-beancount.wasm python "${_npmdir}"
-
- # Non-deterministic race in npm gives 777 permissions to random directories.
- # See https://github.com/npm/cli/issues/1103 for details.
- find "${pkgdir}/usr" -type d -exec chmod 755 {} +
-
- install -Ddm755 "${pkgdir}/usr/bin"
- ln -s "/usr/lib/${_pkgname}/out/cli.js" "${pkgdir}/usr/bin/${_npmname}"
- chmod 755 "${pkgdir}/usr/lib/${_pkgname}/out/cli.js"
+ install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}