Subject: [PATCH] testing/libsignal-client: new aport

From: Siva Mahadevan <[email-masked]>
Date: Sat, 10 Apr 2021 12:36:21 -0400

implementation of the Signal client protocol in Rust
---
 testing/libsignal-client/APKBUILD | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 testing/libsignal-client/APKBUILD

diff --git a/testing/libsignal-client/APKBUILD b/testing/libsignal-client/APKBUILD
new file mode 100644
index 0000000000..66c816ec83
--- /dev/null
+++ b/testing/libsignal-client/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Siva Mahadevan <[email-masked]>
+# Maintainer: Siva Mahadevan <[email-masked]>
+pkgname=libsignal-client
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="implementation of the Signal client protocol in Rust"
+url="https://github.com/signalapp/libsignal-client"
+arch="all !s390x !mips !mips64 !ppc64le" # limited by cargo
+license="AGPL-3.0-only"
+depends="openssl-dev"
+makedepends="rustup"
+source="$pkgname-$pkgver.tar.gz::https://github.com/signalapp/libsignal-client/archive/v$pkgver.tar.gz"
+
+build() {
+	local nightlydir=$(mktemp -p $builddir -d)
+	export CARGO_HOME="$nightlydir/cargo"
+	export RUSTUP_HOME="$nightlydir/rustup"
+	export RUSTFLAGS="-C target-feature=-crt-static"
+	rustup-init -y --no-modify-path --no-update-default-toolchain --default-toolchain $(cat rust-toolchain)
+	$CARGO_HOME/bin/cargo build -p libsignal-jni --release --locked
+}
+
+check() {
+	$CARGO_HOME/bin/cargo test --release --locked
+}
+
+package() {
+	install -Dm755 "target/release/libsignal_jni.so" "$pkgdir/usr/lib/libsignal_jni.so"
+}
+sha512sums="f55581442f67e8b7d5ecbf1416f2932ccc303f6e44cd593cae8dd062a41436209aa542510ef7e8f16b79ad116ed35e6fa88b46cfa09a235485a01a1f1d126cbd  libsignal-client-0.4.0.tar.gz"
-- 
2.31.1