summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43c01f807d1ba395c9ec6795e2b6a3448f2ee197 (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
# Maintainer: IotaBread <iotabread at gmail dot com>
_pkgname=vineflower
pkgname=vineflower-git
_version="1.11.0"
pkgver=1.11.0.r1670.e54ccfd4
pkgrel=1
pkgdesc="Modern Java & JVM language decompiler focused on output quality & readability"
arch=('any')
url="https://vineflower.org"
license=('Apache-2.0')
depends=('java-runtime>=17' 'sh')
makedepends=('java-environment>=17' 'git')
provides=("${_pkgname}=${_version}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/Vineflower/vineflower#branch=develop/${_version}")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${_pkgname}"
	printf "${_version}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${_pkgname}"
	# Skip tests to speed up building
	./gradlew build -x test
}

package() {
	cd "$srcdir/${_pkgname}"
	install -Dm644 "build/libs/${_pkgname}-${_version}+local.jar" "$pkgdir/usr/share/java/${_pkgname}/${_pkgname}.jar"
	install -d "$pkgdir/usr/bin"
	printf '#!/usr/bin/sh\nexec java -jar /usr/share/java/%s/%s "$@"\n' "${_pkgname}" "${_pkgname}.jar" > $pkgdir/usr/bin/${_pkgname}
	chmod 755 $pkgdir/usr/bin/${_pkgname}
}