blob: f4f83c2bfc2beecec8ce2b960542ba50fecc3066 (
plain) (
blame)
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
|
pkgname=cgit-syntect-bat
pkgver=0.24.0
pkgrel=1
pkgdesc="syntax pack based on bat for cgit-syntect"
arch=(any)
url="https://github.com/sharkdp/bat"
makedepends=(bat cgit-syntect)
source=("git+$url#commit=v$pkgver")
sha256sums=(SKIP)
pkgver() {
bat --version | sed -n 's/^bat \([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/p'
}
prepare() {
sed -i 's/bat .*//' bat/assets/create.sh # don't automatically build
sed -i 's/local submodule_prompt=unspecified/local submodule_prompt=y/' bat/assets/create.sh # don't prompt user
sed -i 's/^trap reverse_patches .*$//' bat/assets/create.sh # don't reverse patches
}
build() {
bat/assets/create.sh # prepare submodules and patches
MODE=compile cgit-syntect $srcdir/bat/assets/syntaxes syntax.packdump # compile syntaxes
}
package() {
install -Dm0755 -t "$pkgdir/usr/share/cgit-syntect" syntax.packdump
}
|