vlang-ls-git/PKGBUILD

49 lines
1.4 KiB
Bash
Raw Normal View History

2022-04-25 22:50:04 +02:00
# Maintainer: Jef Roosens
pkgname=vieter-vls
2022-06-09 08:52:08 +02:00
pkgver=r582.5ad842f
2022-04-25 22:50:04 +02:00
pkgrel=1
2022-06-09 08:52:08 +02:00
pkgdesc='Language server for the V programming language; synced with the vieter-v compiler.'
arch=('x86_64' 'aarch64')
2022-04-25 22:50:04 +02:00
2022-06-09 08:52:08 +02:00
url='https://github.com/vlang/vls'
license=('MIT')
2022-04-25 22:50:04 +02:00
2022-06-09 08:52:08 +02:00
depends=('glibc' 'vieter-v')
makedepends=('git')
2022-04-25 22:50:04 +02:00
2022-06-09 08:52:08 +02:00
source=("${pkgname}::git+https://github.com/vlang/vls")
md5sums=('SKIP')
2022-04-25 22:50:04 +02:00
pkgver() {
2022-06-09 08:52:08 +02:00
cd "${pkgname}"
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
2022-04-25 22:50:04 +02:00
}
build() {
2022-06-09 08:52:08 +02:00
cd "${pkgname}"
2022-04-25 22:50:04 +02:00
2022-06-09 08:52:08 +02:00
v run build.vsh gcc
msg "Building treesitter grammar..."
# Building with -prod is required because otherwise, the binary contains
# tcc symbols which isn't usually installed on the user's system.
2022-04-26 20:53:58 +02:00
v -cc gcc -shared -prod tree_sitter_v
2022-04-25 22:50:04 +02:00
}
package() {
# Install vls
2022-06-09 08:52:08 +02:00
install -dm755 "${pkgdir}/usr/bin"
install -Dm755 "${pkgname}/bin/vls" "${pkgdir}/usr/bin/vls"
install -Dm644 "${pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
# Install treesitter grammar
# This package installs the parser & queries for Neovim in its runtimepath
2022-06-09 08:52:08 +02:00
install -dm755 "${pkgdir}/usr/share/nvim/runtime/parser"
install -dm755 "${pkgdir}/usr/share/nvim/runtime/queries/v"
install -Dm755 "${pkgname}/tree_sitter_v/tree_sitter_v.so" "${pkgdir}/usr/share/nvim/runtime/parser/v.so"
install -m644 "${pkgname}/tree_sitter_v/queries"/* "${pkgdir}/usr/share/nvim/runtime/queries/v"
2022-04-25 22:50:04 +02:00
}