blob: c015dbe087b1a8f8ee828aa444ffe09bbf7cb6e7 (
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
|
# Maintainer: Adam Perkowski <adas1per@protonmail.com>
# https://github.com/adamperkowski/PKGBUILDs
__pkgname=jule
_pkgname="tree-sitter-$__pkgname"
pkgname="$_pkgname-git"
pkgver=1.r0.gea815c0
pkgrel=2
pkgdesc='Jule syntax tree for the Tree-sitter parsing library'
groups=('jule' 'tree-sitter-grammars')
arch=('any')
url="https://github.com/TheLooped/$_pkgname"
license=('BSD-3-Clause')
source=("git+$url.git")
sha256sums=('SKIP')
makedepends=('tree-sitter' 'git')
provides=("$_pkgname")
conflicts=("$_pkgname")
pkgver() {
cd "$_pkgname"
echo "1.r$(git describe --all --long | sed 's/-/./g' | cut -d '.' -f 2-)"
}
prepare() {
cd "$_pkgname"
tree-sitter init-config &> /dev/null | true
tree-sitter generate
}
build() {
cd "$_pkgname"
tree-sitter build
}
# comment tests failing
# check() {
# cd "$_pkgname"
# tree-sitter test
# }
package() {
cd "$_pkgname"
install -Dm664 "$__pkgname.so" "$pkgdir/usr/lib/lib$_pkgname.so"
mkdir -p "$pkgdir/usr/share/nvim/runtime/parser"
mkdir -p "$pkgdir/usr/lib/tree_sitter"
ln -s "/usr/lib/lib$_pkgname.so" "$pkgdir/usr/share/nvim/runtime/parser/$__pkgname.so"
ln -s "/usr/lib/lib$_pkgname.so" "$pkgdir/usr/lib/tree_sitter/$__pkgname.so"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}
# vim: ts=2 sw=2 et:
|