Skip to content

Commit

Permalink
- EL8: change source of bundled libsignal_jni.so
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiering committed Jul 29, 2024
1 parent 873a871 commit 62d8835
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions signal-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# required major JAVA version
%global version_java_major 21

%global release_token 1
%global release_token 2


%global basedir /usr/lib/%{pname}
Expand All @@ -52,7 +52,9 @@ URL: https://github.com/AsamK/signal-cli
Source0: https://github.com/AsamK/signal-cli/releases/download/v%{version}/signal-cli-%{version}.tar.gz

# only used on EL8 since 0.12.0
Source1: https://github.com/exquo/signal-libs-build/releases/download/libsignal_v%{version_libsignal}/libsignal_jni.so-v%{version_libsignal}-x86_64-unknown-linux-gnu.tar.gz
#Source1: https://github.com/exquo/signal-libs-build/releases/download/libsignal_v%{version_libsignal}/libsignal_jni.so-v%{version_libsignal}-x86_64-unknown-linux-gnu.tar.gz
# only used on EL8 since 0.52.1
Source1: https://media.projektzentrisch.de/temp/signal-cli/tests/libsignal_jni_so%(echo "%{version_libsignal}" | awk -F. '{ printf "%01d%02d%01d", $1, $2, $3 }')_ubuntu1804_amd64.gz


## config files taken+adjusted from https://github.com/AsamK/signal-cli/tree/master/data
Expand Down Expand Up @@ -126,7 +128,8 @@ install -d -p %{buildroot}%{basedir}

# replace libsignal_jni.so
%if 0%{?rhel} == 8
%{__tar} xf %{SOURCE1} -C %{buildroot}%{basedir}
#%{__tar} xf %{SOURCE1} -C %{buildroot}%{basedir}
gunzip -c %{SOURCE1} >%{buildroot}%{basedir}/libsignal_jni.so
# check compatibility
if ldd %{buildroot}%{basedir}/libsignal_jni.so | grep "not found"; then
echo "ERROR : libsignal_jni.so is not compatible"
Expand Down Expand Up @@ -282,6 +285,9 @@ systemctl condrestart %{pname}.service


%changelog
* Mon Jul 29 2024 Peter Bieringer <[email protected]> - 0.13.5-2
- EL8: change source of bundled libsignal_jni.so

* Sun Jul 28 2024 Peter Bieringer <[email protected]>
- EL8: improve check of libsignal_jni.so before implanting

Expand Down

0 comments on commit 62d8835

Please sign in to comment.