blob: e1a0e5c301c1e262bda65c817412fa68fe3e5c9d (
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
|
pkgname=briar-headless-git
_pkgname=briar-headless
conflicts=('briar-headless')
pkgver=1.2.11.r0.g8cbb38ee6
pkgrel=1
pkgdesc='Briar REST API'
arch=(any)
url="https://code.briarproject.org/briar/briar"
license=('GPL')
depends=('java-runtime=11' 'bash')
makedepends=('git' 'jdk11-openjdk')
source=("${_pkgname}::git+https://code.briarproject.org/briar/briar.git")
sha256sums=('SKIP')
pkgver(){
cd ${_pkgname}
git describe --long --tags | sed -e 's/^release-//' -e 's/^beta-//' -e 's/-\([^-]*-g[^-]*\)$/-r\1/' -e 's/-/./g'
}
build() {
cd "${_pkgname}"
export PATH="/usr/lib/jvm/java-11-openjdk/jre/bin/:$PATH"
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
./gradlew --configure-on-demand briar-headless:jar
}
package() {
cd "${_pkgname}/${_pkgname}"
# depends+=("java-runtime")
install -dm755 "$pkgdir/usr/bin/"
cat << EOF > "$pkgdir/usr/bin/$_pkgname"
#!/bin/sh
exec /usr/bin/java -jar '/usr/share/java/briar-headless.jar' "$@"
EOF
chmod +x "$pkgdir/usr/bin/$_pkgname"
install -m 644 -D "build/libs/$_pkgname.jar" "$pkgdir/usr/share/java/$_pkgname.jar"
}
|