aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/java-libsignal-client/APKBUILD39
-rwxr-xr-xtesting/java-libsignal-client/java-libsignal-client.post-install8
-rwxr-xr-xtesting/java-libsignal-client/java-libsignal-client.post-upgrade8
3 files changed, 55 insertions, 0 deletions
diff --git a/testing/java-libsignal-client/APKBUILD b/testing/java-libsignal-client/APKBUILD
new file mode 100644
index 0000000000..466f621792
--- /dev/null
+++ b/testing/java-libsignal-client/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
+# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
+pkgname=java-libsignal-client
+pkgver=0.12.1
+pkgrel=0
+pkgdesc="libsignal-client contains platform-agnostic APIs useful for Signal client apps"
+url="https://github.com/signalapp/libsignal-client"
+# * disabled on aarch64 due to:
+# error[E0554]: #![feature] may not be used on the stable release channel
+# --> /home/buildozer/.cargo/registry/src/github.com-1ecc6299db9ec823/polyval-0.5.3/src/lib.rs:80:5
+# * rust and cargo not available on s390x and riscv64
+arch="all !aarch64 !s390x !riscv64"
+license="AGPL-3.0-or-later"
+depends="java-jre-headless"
+makedepends="bash cargo openjdk8 protoc rust zip"
+source="$pkgname-$pkgver.tar.gz::https://github.com/signalapp/libsignal-client/archive/v$pkgver.tar.gz"
+install="$pkgname.post-install $pkgname.post-upgrade"
+builddir="$srcdir/libsignal-client-$pkgver/java"
+
+build() {
+ ./gradlew compileJava
+}
+
+check() {
+ ./gradlew test
+}
+
+package() {
+ install -D -m644 "$builddir"/java/build/libs/signal-client-java-$pkgver.jar \
+ -t "$pkgdir"/usr/share/java/libsignal-client
+ install -D -m755 "$builddir"/../target/release/libsignal_jni.so \
+ -t "$pkgdir"/usr/lib
+ zip -d "$pkgdir"/usr/share/java/libsignal-client/signal-client-java-$pkgver.jar \
+ libsignal_jni.so
+}
+
+sha512sums="
+771d91bec8bbd4e5ff1c12b813e9eb2703b3b2b919aaf0f50d37bd991371e92ae2a733448d0677cf157b0b9be5e27f2d27a2d69da7451ae8e14e5946cb4701d3 java-libsignal-client-0.12.1.tar.gz
+"
diff --git a/testing/java-libsignal-client/java-libsignal-client.post-install b/testing/java-libsignal-client/java-libsignal-client.post-install
new file mode 100755
index 0000000000..99a814ee78
--- /dev/null
+++ b/testing/java-libsignal-client/java-libsignal-client.post-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cd /usr/share/java/libsignal-client
+LATEST=`ls -d signal-client-java-*.jar | sort -Vr | head -1`
+if [ -n "$LATEST" ]; then
+ ln -sf $LATEST /usr/share/java/libsignal-client/signal-client-java.jar
+fi
+
diff --git a/testing/java-libsignal-client/java-libsignal-client.post-upgrade b/testing/java-libsignal-client/java-libsignal-client.post-upgrade
new file mode 100755
index 0000000000..99a814ee78
--- /dev/null
+++ b/testing/java-libsignal-client/java-libsignal-client.post-upgrade
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cd /usr/share/java/libsignal-client
+LATEST=`ls -d signal-client-java-*.jar | sort -Vr | head -1`
+if [ -n "$LATEST" ]; then
+ ln -sf $LATEST /usr/share/java/libsignal-client/signal-client-java.jar
+fi
+