From 97c443d7aea38371b6bf95d7715afd29a970f730 Mon Sep 17 00:00:00 2001 From: Hervy Qurrotul Ainur Rozi Date: Tue, 25 Jul 2023 15:30:23 +0700 Subject: [PATCH] zulip-desktop: update to 5.10.3 --- srcpkgs/zulip-desktop/files/zulip.desktop | 9 +++++ srcpkgs/zulip-desktop/template | 47 ++++++++++++++++++----- 2 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/zulip-desktop/files/zulip.desktop diff --git a/srcpkgs/zulip-desktop/files/zulip.desktop b/srcpkgs/zulip-desktop/files/zulip.desktop new file mode 100644 index 0000000000000..1ba42f21f80d4 --- /dev/null +++ b/srcpkgs/zulip-desktop/files/zulip.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Zulip +Exec=zulip +Terminal=false +Type=Application +Icon=zulip +StartupWMClass=Zulip +Comment=Zulip Desktop Client for Linux +Categories=Chat;GNOME;GTK;Network;InstantMessaging; diff --git a/srcpkgs/zulip-desktop/template b/srcpkgs/zulip-desktop/template index 0a7cff02033f9..43f160bb60209 100644 --- a/srcpkgs/zulip-desktop/template +++ b/srcpkgs/zulip-desktop/template @@ -1,14 +1,43 @@ # Template file for 'zulip-desktop' pkgname=zulip-desktop -version=0.5.1 -revision=2 -build_style=cmake -configure_args="-DBUILD_WITH_QT5=On" -hostmakedepends="qt5-host-tools qt5-qmake" -makedepends="qt5-webkit-devel phonon-qt5-devel qt5-svg-devel qt5-multimedia-devel" +version=5.10.3 +revision=1 +_electronver=24.3.0 +_npmver=9.5.1 +hostmakedepends="nodejs python3" +makedepends="GConf-devel electron24 libxkbfile-devel libXtst-devel" +depends="electron24 gtk+3 nss" short_desc="Workplace chat that improves your productivity" maintainer="Luca - " license="Apache-2.0" -homepage="https://www.zulip.org/" -distfiles="https://github.com/zulip/zulip-desktop-legacy/archive/${version}.tar.gz" -checksum=2475e5298b7df29c7ee8585da7189f4af8dda279e5e1d6e26c8f3fa08ce31ae5 +homepage="https://www.zulip.com" +distfiles="https://github.com/zulip/zulip-desktop/archive/refs/tags/v${version}.tar.gz" +checksum=0ac9a029943030c21c8f77b09c48d49d0bd9823532577bee17d83ebf0fbbd177 + +do_configure() { + npm ci +} + +do_build() { + npm install -g npm@${_npmver} + npm run pack + + /usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp install \ + --target=$_electronver \ + --tarball=/usr/include/electron${_electronver%%.*}/node_headers.tar.gz +} + +do_install() { + cat > zulip <<-EOF + #!/bin/sh + exec electron${_electronver%%.*} /usr/lib/zulip-desktop/app.asar "\$@" + EOF + vbin zulip + + vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib/zulip-desktop + vinstall ${FILESDIR}/zulip.desktop 0644 usr/share/applications + + for i in 16 24 32 48 64 128 256 512 1024 ; do + vinstall build/icons/${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps zulip.png + done +}