From 7050cfaa7ea564735f4e0a099810c7b842767b64 Mon Sep 17 00:00:00 2001 From: reedts Date: Wed, 16 Jun 2021 09:56:32 +0200 Subject: [PATCH] Signal-Desktop: update to 5.6.2. --- .../patches/build-from-tarball.patch | 9 ----- .../expire-from-source-date-epoch.patch | 13 +++++++ srcpkgs/Signal-Desktop/template | 35 +++++++++++++------ 3 files changed, 38 insertions(+), 19 deletions(-) delete mode 100644 srcpkgs/Signal-Desktop/patches/build-from-tarball.patch create mode 100644 srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch diff --git a/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch b/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch deleted file mode 100644 index cab451f7f35c..000000000000 --- a/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/Gruntfile.js 2020-04-26 23:32:09.861789510 +0200 -+++ b/Gruntfile.js 2020-04-26 23:32:21.424734031 +0200 -@@ -452,6 +452,5 @@ - 'concat', - 'copy:deps', - 'sass', -- 'date', - ]); - }; diff --git a/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch b/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch new file mode 100644 index 000000000000..d29c79835179 --- /dev/null +++ b/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch @@ -0,0 +1,13 @@ +--- a/Gruntfile.js ++++ b/Gruntfile.js +@@ -203,9 +203,7 @@ module.exports = grunt => { + }); + + grunt.registerTask('getExpireTime', () => { +- grunt.task.requires('gitinfo'); +- const gitinfo = grunt.config.get('gitinfo'); +- const committed = gitinfo.local.branch.current.lastCommitTime; ++ const committed = parseInt(process.env.SOURCE_DATE_EPOCH, 10) * 1000; + const time = Date.parse(committed) + 1000 * 60 * 60 * 24 * 90; + grunt.file.write( + 'config/local-production.json', diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template index 8999b6e483ff..03b925a60e53 100644 --- a/srcpkgs/Signal-Desktop/template +++ b/srcpkgs/Signal-Desktop/template @@ -1,33 +1,46 @@ # Template file for 'Signal-Desktop' pkgname=Signal-Desktop -version=1.39.5 +version=5.6.2 revision=1 -# Due to electron +# Signal officially only supports x86_64 (also due to Electron) +# discontinued Electron 32-bit support: https://www.electronjs.org/blog/linux-32bit-support # 32-bit is not supported https://github.com/signalapp/Signal-Desktop/issues/1661 +# armv7hf/arm64: https://github.com/signalapp/Signal-Desktop/issues/3410 archs="x86_64" -hostmakedepends="git nodejs python tar yarn" -depends="libnotify libappindicator" +hostmakedepends="git git-lfs nodejs python3 tar yarn" +depends="cairo gtk+3 libvips pango" short_desc="Signal Private Messenger for Linux" maintainer="Julio Galvan " -license="GPL-3.0-only" +license="AGPL-3.0-only" homepage="https://github.com/signalapp/Signal-Desktop" distfiles="https://github.com/signalapp/Signal-Desktop/archive/v${version}.tar.gz" -checksum=f9f55c0195579b43712bf370b753337432eda4bcf89809d1c8f3deb0b4ee4400 +checksum=9bafd0673ce518379dd3f872beb3f3075bc29a979ea5328150c4c842ef910e87 nostrip_files="signal-desktop" -pre_build() { - vsed -e 's/"node": "/&>=/' -i package.json +post_extract() { + # git-lfs hook needs to be installed for one of the dependencies + git lfs install + + vsed 's/"node": "/&>=/' -i package.json + + # Dependencies have to be installed before applying patch + yarn install --ignore-engines --frozen-lockfile } do_build() { - yarn install --ignore-engines yarn grunt - yarn build-release --dir + yarn generate + yarn build-release } do_install() { vmkdir usr/lib/signal-desktop + # Remove prebuilt binaries for foreign architectures (to not confuse strip) + for prebin in darwin-x64 linux-arm64 win32-ia32 win32-x64; do + rm -rf release/linux-unpacked/resources/app.asar.unpacked/node_modules/{ffi-napi,ref-napi}/prebuilds/$prebin + done + vcopy release/linux-unpacked/* usr/lib/signal-desktop vmkdir usr/bin @@ -40,4 +53,6 @@ do_install() { for size in 16 32 48 128 256 1024; do vinstall images/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ signal.png done + + vlicense LICENSE }