summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5eb53329e36aaa50226f07d573339ab3e8d0d27a (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=tree-sitter-swift
pkgver=0.7.0
pkgrel=2
pkgdesc="Swift grammar for tree-sitter"
arch=('i686' 'x86_64')
url="https://github.com/alex-pinkus/tree-sitter-swift"
license=('MIT')
groups=('tree-sitter-grammars')
depends=('glibc')
makedepends=('nodejs' 'tree-sitter-cli')
provides=('libtree-sitter-swift.so')
options=('staticlibs')
source=("$pkgname-$pkgver-src.tar.gz::https://github.com/alex-pinkus/tree-sitter-swift/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('37b447ede9e0b2d95a8a960b40e575fc43c17d02d18b11c74df873be2869067c')


build() {
  cd "$pkgname-$pkgver"

  tree-sitter generate
  CFLAGS="$CFLAGS -ffat-lto-objects" \
  make
}

check() {
  cd "$pkgname-$pkgver"

  #tree-sitter test
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" PREFIX="/usr" install
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/tree-sitter-swift"
  install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/tree-sitter-swift"
}