This commit is contained in:
commit
9dc77c6b86
4 changed files with 154 additions and 0 deletions
50
vlang/PKGBUILD.vls
Normal file
50
vlang/PKGBUILD.vls
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Maintainer: Jef Roosens
|
||||
|
||||
pkgname=vieter-vls
|
||||
pkgver=r678.607138c
|
||||
pkgrel=1
|
||||
pkgdesc='Locked version used with for Vieter development.'
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
||||
url='https://github.com/vlang/vls'
|
||||
license=('MIT')
|
||||
|
||||
depends=('glibc' 'vieter-vlang')
|
||||
makedepends=('git')
|
||||
|
||||
source=("${pkgname}::git+https://github.com/vlang/vls")
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${pkgname}"
|
||||
|
||||
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}"
|
||||
|
||||
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.
|
||||
v -cc gcc -shared -prod tree_sitter_v
|
||||
}
|
||||
|
||||
package() {
|
||||
# Install vls
|
||||
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
|
||||
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"
|
||||
}
|
||||
|
||||
# vim: ft=bash
|
||||
Reference in a new issue