From e13229e3edf8717846218c2a72036496ef8e41f3 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:48:48 +0100 Subject: [PATCH] rebuilt with nvm to install compatible nodejs versione (16.13.0) [release 5.40.1-3mamba;Wed Apr 27 2022] --- README.md | 2 + ...5.40.1-expire-from-source-date-epoch.patch | 11 ++ ...p-5.40.1-fix-better-sqlite-ssl-error.patch | 10 ++ signal-desktop.desktop | 13 ++ signal-desktop.spec | 118 ++++++++++++++++++ 5 files changed, 154 insertions(+) create mode 100644 signal-desktop-5.40.1-expire-from-source-date-epoch.patch create mode 100644 signal-desktop-5.40.1-fix-better-sqlite-ssl-error.patch create mode 100644 signal-desktop.desktop create mode 100644 signal-desktop.spec diff --git a/README.md b/README.md index 33956e4..7f27299 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # signal-desktop +Signal Desktop links with Signal on Android or iOS and lets you message from your computers. + diff --git a/signal-desktop-5.40.1-expire-from-source-date-epoch.patch b/signal-desktop-5.40.1-expire-from-source-date-epoch.patch new file mode 100644 index 0000000..5976926 --- /dev/null +++ b/signal-desktop-5.40.1-expire-from-source-date-epoch.patch @@ -0,0 +1,11 @@ +--- a/ts/scripts/get-expire-time.ts ++++ b/ts/scripts/get-expire-time.ts +@@ -8,7 +8,7 @@ import { writeFileSync } from 'fs'; + import { DAY } from '../util/durations'; + + const unixTimestamp = parseInt( +- execSync('git show -s --format=%ct').toString('utf8'), ++ process.env.SOURCE_DATE_EPOCH || execSync('git show -s --format=%ct').toString('utf8'), + 10 + ); + const buildCreation = unixTimestamp * 1000; diff --git a/signal-desktop-5.40.1-fix-better-sqlite-ssl-error.patch b/signal-desktop-5.40.1-fix-better-sqlite-ssl-error.patch new file mode 100644 index 0000000..787189d --- /dev/null +++ b/signal-desktop-5.40.1-fix-better-sqlite-ssl-error.patch @@ -0,0 +1,10 @@ +--- Signal-Desktop-5.40.1/package.json.orig 2022-04-25 17:34:46.527032365 +0200 ++++ Signal-Desktop-5.40.1/package.json 2022-04-25 17:15:29.038266511 +0200 +@@ -14,6 +14,7 @@ + "scripts": { + "postinstall": "yarn build:acknowledgments && patch-package && yarn electron:install-app-deps && rimraf node_modules/dtrace-provider", + "postuninstall": "yarn build:acknowledgments", ++ "preinstall": "npm install better-sqlite3@'^7.5.1' --no-save --force", + "start": "electron .", + "generate": "npm-run-all build-protobuf build:esbuild sass get-expire-time copy-and-concat", + "build-release": "yarn run build", diff --git a/signal-desktop.desktop b/signal-desktop.desktop new file mode 100644 index 0000000..b8aaa2f --- /dev/null +++ b/signal-desktop.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Name=Signal +Comment=Signal - Private Messenger +Comment[de]=Signal - Sicherer Messenger +Icon=signal-desktop +Exec=signal-desktop --use-tray-icon -- %u +Terminal=false +Categories=Network;InstantMessaging; +StartupWMClass=Signal +MimeType=x-scheme-handler/sgnl; +Keywords=sgnl;chat;im;messaging;messenger;sms;security;privat; +X-GNOME-UsesNotifications=true diff --git a/signal-desktop.spec b/signal-desktop.spec new file mode 100644 index 0000000..5827640 --- /dev/null +++ b/signal-desktop.spec @@ -0,0 +1,118 @@ +Name: signal-desktop +Version: 5.40.1 +Release: 3mamba +Summary: Signal Desktop links with Signal on Android or iOS and lets you message from your computers +Group: Graphical Desktop/Applications/Internet +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://signal.org/ +Source: https://github.com/signalapp/Signal-Desktop.git/v%{version}/Signal-Desktop-%{version}.tar.bz2 +Source2: signal-desktop.desktop +Patch0: signal-desktop-5.40.1-expire-from-source-date-epoch.patch +Patch1: signal-desktop-5.40.1-fix-better-sqlite-ssl-error.patch +License: Affero GNU Public License +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXdamage-devel +BuildRequires: libXext-devel +BuildRequires: libXfixes-devel +BuildRequires: libXrandr-devel +BuildRequires: libalsa-devel +BuildRequires: libat-spi2-atk-devel +BuildRequires: libat-spi2-core-devel +BuildRequires: libatk-devel +BuildRequires: libcairo-devel +BuildRequires: libcups-devel +BuildRequires: libdbus-devel +BuildRequires: libdrm-devel +BuildRequires: libexpat-devel +BuildRequires: libgcc +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libglib-devel +BuildRequires: libgtk3-devel +BuildRequires: libmesa-devel +BuildRequires: libnspr-devel +BuildRequires: libnss-devel +BuildRequires: libpango-devel +BuildRequires: libstdc++6-devel +BuildRequires: libvips-devel +BuildRequires: libxcb-devel +BuildRequires: libxkbcommon-devel +## AUTOBUILDREQ-END +BuildRequires: git-lfs + +%description +Signal Desktop links with Signal on Android or iOS and lets you message from your computers. + +%debug_package + +%prep +%setup -q -n Signal-Desktop-%{version} +#-D -T +#:<< _EOF + +# Requires Nodejs 16.13.0 +export PROFILE=/dev/null +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# git-lfs hook needs to be installed for one of the dependencies +git lfs install + +# Allow higher Node versions +#sed 's#"node": "#&>=#' -i package.json + +%patch0 -p1 -b .expire-from-source-date-epoch +#%patch1 -p1 + +yarn install +#--ignore-engines + +%build +#:<< _EOF +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +export SOURCE_DATE_EPOCH=`date +%s` + +yarn generate +yarn build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d -m0755 %{buildroot}{%{_libdir},%{_bindir}} +cp -a release/linux-unpacked %{buildroot}%{_libdir}/signal-desktop +ln -s ../%{_lib}/signal-desktop/signal-desktop %{buildroot}%{_bindir} + +install -D -m0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/signal-desktop.desktop + +for i in 16 24 32 48 64 128 256 512 1024; do + install -D -m0644 build/icons/png/${i}x${i}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/signal-desktop.png +done + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/signal-desktop +%{_datadir}/applications/signal-desktop.desktop +%dir %{_libdir}/signal-desktop +%{_libdir}/signal-desktop/* +%{_datadir}/icons/hicolor/*/apps/signal-desktop.png +%doc LICENSE + +%changelog +* Wed Apr 27 2022 Silvan Calarco 5.40.1-3mamba +- rebuilt with nvm to install compatible nodejs versione (16.13.0) + +* Tue Apr 26 2022 Silvan Calarco 5.40.1-2mamba +- rebuilt + +* Sat Apr 23 2022 Silvan Calarco 5.40.1-1mamba +- package created using the webbuild interface