Skip to content

Commit

Permalink
signal-cli 0.8.4.1
Browse files Browse the repository at this point in the history
libsignal-client 0.8.1
  • Loading branch information
chenrui333 committed Jun 23, 2021
1 parent b7aeea4 commit b7e7ee0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Formula/signal-cli.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class SignalCli < Formula
desc "CLI and dbus interface for WhisperSystems/libsignal-service-java"
homepage "https://github.com/AsamK/signal-cli"
url "https://github.com/AsamK/signal-cli/releases/download/v0.8.3/signal-cli-0.8.3.tar.gz"
sha256 "56c38b4b070b44a335835275b3a05f8f047d887f6bfb410bf9e4e2e60ce1a15c"
url "https://github.com/AsamK/signal-cli/releases/download/v0.8.4.1/signal-cli-0.8.4.1.tar.gz"
sha256 "f1286d0b7a759f0bc86496d87f5cb24bb9a208eb8383d0f33815452bb5a331d6"
license "GPL-3.0-or-later"

bottle do
Expand All @@ -23,15 +23,14 @@ class SignalCli < Formula
resource "libsignal-client" do
# per https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#libsignal-client
# we want the specific libsignal-client version from 'signal-cli-0.8.1/lib/signal-client-XXXX-X.X.X.jar'
version "java-0.2.3"
url "https://github.com/signalapp/libsignal-client/archive/refs/tags/#{version}.tar.gz"
sha256 "730c1dc113da5227920716656d8f888e1af167208e095a8cac3de9c0d83890c4"
url "https://github.com/signalapp/libsignal-client/archive/v0.8.1.tar.gz"
sha256 "549d3607919f537649aa3f179681161a2ea0a08786a684c4faf2afdc7fd60aaa"
end

resource "libzkgroup" do
# per https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#libzkgroup
# we want the latest release version
url "https://github.com/signalapp/zkgroup/archive/refs/tags/v0.7.2.tar.gz"
url "https://github.com/signalapp/zkgroup/archive/v0.7.2.tar.gz"
sha256 "fdd03bbf584533963d1be40ab238d4e6199b379e8112f6aaf5cd9493b7f1fb47"
end

Expand All @@ -47,14 +46,14 @@ def install
# https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#building-libsignal-client-yourself

# rm originally-embedded libsignal_jni lib
system "zip", "-d", libexec/"lib/signal-client-#{r.version}.jar", "libsignal_jni.so"
system "zip", "-d", libexec/"lib/signal-client-java-#{r.version}.jar", "libsignal_jni.so"

# build & embed library for current platform
cd "java" do
inreplace "settings.gradle", ", ':android'", ""
system "./build_jni.sh", "desktop"
cd "java/src/main/resources" do
system "zip", "-u", libexec/"lib/signal-client-#{r.version}.jar", shared_library("libsignal_jni")
system "zip", "-u", libexec/"lib/signal-client-java-#{r.version}.jar", shared_library("libsignal_jni")
end
end
end
Expand Down

0 comments on commit b7e7ee0

Please sign in to comment.