blob: e1bea98488c36995104a09946f6d3d478eaafb0c (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Maintainer: <asamk@gmx.de>
pkgname=libsignal-client
_libname=libsignal_jni
pkgver=0.8.2
pkgrel=1
pkgdesc='Library for the Signal Protocol.'
url="https://github.com/signalapp/${pkgname}"
makedepends=('rustup' 'cargo' 'gradle' 'git' 'zip' 'protobuf')
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
license=('GPL3')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/signalapp/${pkgname}/archive/refs/tags/v$pkgver.tar.gz"
"fix_gradle_7.patch"
)
sha512sums=('cb608efbfedfe1a75bcbf3733efd2396bd053f874a2b3b4fcfa2b233384135bfaeb245fef19e3fbd6e1fce8307533151be82af03563cdf75b8ecd546fdd48987'
'fdaf7037f0338379701e9669012e4b4e47d17f99a195c70ce057dbdd626c8699abb1c6387fb65d0ab0e32bed5cdceed50db39712f542c150b24606824a3361f5')
prepare() {
tar xf "${pkgname}-$pkgver.tar.gz"
cd "${pkgname}-${pkgver}"
# currently nightly is required ... so rustup is required a makedepends
# # Use the default system rust toolchain
# rm -f rust-toolchain
# Do not build the android library
sed -i "s/, ':android'//" java/settings.gradle
# Fix build with gradle 7
sed -i "s/compile/implementation/" java/tests/build.gradle
sed -i "s/Compile/Implementation/" java/tests/build.gradle
patch -p1 < ../fix_gradle_7.patch
}
build() {
cd "${pkgname}-${pkgver}/java"
./build_jni.sh desktop
gradle --no-daemon assemble
zip -d "java/build/libs/signal-client-java-${pkgver}.jar" "${_libname}.so"
}
package() {
cd "${pkgname}-${pkgver}"
install -m755 -d "${pkgdir}/usr/share/java/${pkgname}" "${pkgdir}/usr/lib"
install -Dm644 "java/java/build/libs/signal-client-java-${pkgver}.jar" "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
install -Dm644 "target/release/${_libname}.so" "$pkgdir/usr/lib/"
}
|