summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 50e83ffe1eee4967fc5bce4413c4012900c846a3 (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
pkgname=briar-headless
conflicts=('briar-headless-git')
pkgver=1.2.11
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#tag=release-${pkgver}")
sha256sums=('SKIP')

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"
}