commit a01e4ba944c09fc1be5378591c606181ab5c9bde3da041fc7a4941ab7ee295f0 Author: Dominique Leuenberger Date: Tue Jun 29 20:42:57 2021 +0000 Accepting request 902768 from devel:languages:javascript matrix client. please use same ADI as https://build.opensuse.org/request/show/902766 OBS-URL: https://build.opensuse.org/request/show/902768 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/element-desktop?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/dist.tar.gz b/dist.tar.gz new file mode 100644 index 0000000..0cca36b --- /dev/null +++ b/dist.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6302aab456e224f3135b0d3ee1055b87265b15321213dcbe52c133ca0e3bfeed +size 16173602 diff --git a/element-desktop-1.7.31.tar.gz b/element-desktop-1.7.31.tar.gz new file mode 100644 index 0000000..dd1a5c6 --- /dev/null +++ b/element-desktop-1.7.31.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0cdd4defb67498f166b986f4bdb707187c0c0619a55dc8f003e6c44d20ebb39 +size 1896536 diff --git a/element-desktop.changes b/element-desktop.changes new file mode 100644 index 0000000..24fbcea --- /dev/null +++ b/element-desktop.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 25 13:21:03 UTC 2021 - Dominik Heidler + +- Version 1.7.31 + +------------------------------------------------------------------- +Tue May 18 11:13:11 UTC 2021 - Dominik Heidler + +- Version 1.7.28 diff --git a/element-desktop.sh b/element-desktop.sh new file mode 100644 index 0000000..a57aeb3 --- /dev/null +++ b/element-desktop.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +electron /usr/lib/element/app.asar "$@" diff --git a/element-desktop.spec b/element-desktop.spec new file mode 100644 index 0000000..2309d2f --- /dev/null +++ b/element-desktop.spec @@ -0,0 +1,90 @@ +# +# spec file for package element-desktop +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: element-desktop +Version: 1.7.31 +Release: 0 +Summary: A glossy Matrix collaboration client - desktop +License: Apache-2.0 +URL: https://github.com/vector-im/element-desktop +Source0: https://github.com/vector-im/element-desktop/archive/v%{version}.tar.gz#/element-desktop-%{version}.tar.gz +Source1: https://github.com/vector-im/element-web/archive/v%{version}.tar.gz#/element-web-%{version}.tar.gz +Source2: dist.tar.gz +Source3: io.element.Element.desktop +Source4: element-desktop.sh +Source5: prepare_tarball.sh +BuildRequires: element-web +BuildRequires: hicolor-icon-theme +BuildRequires: nodejs-electron +Requires: element-web +Requires: nodejs-electron +BuildArch: noarch + +%description +A glossy Matrix collaboration client - desktop + +%prep +%setup -q +sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "12.0.4"@g' package.json +sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json +pwd +cd .. +pwd +ls -l +tar xvf %{SOURCE1} +cd element-desktop-%{version} + +%build +# Unpack prepared (see prepare.sh) webapp +tar xvf %{SOURCE2} + +%install +install -d %{buildroot}{%{_prefix}/lib/element/,%{_sysconfdir}/webapps/element} + +# Install the app content, replace the webapp with a symlink to the system package +cp -r dist/linux-unpacked/resources/* "%{buildroot}%{_prefix}/lib/element/" +ln -s %{_datadir}/webapps/element "%{buildroot}%{_prefix}/lib/element/webapp" + +# Config file +ln -s %{_sysconfdir}/element/config.json "%{buildroot}%{_sysconfdir}/webapps/element/config.json" +install -Dm644 element.io/release/config.json -t "%{buildroot}%{_sysconfdir}/element" +mkdir -p "%{buildroot}%{_datadir}/webapps/element/" +ln -s %{_sysconfdir}/webapps/element/config.json "%{buildroot}%{_datadir}/webapps/element/config.json" # moved here from element-web to make symlink check happy + +# Required extras +install -Dm644 %{SOURCE3} -t "%{buildroot}%{_datadir}/applications/" +install -Dm755 %{SOURCE4} "%{buildroot}%{_bindir}/%{name}" + +# Icons +install -Dm644 ../element-web-%{version}/res/themes/element/img/logos/element-logo.svg "%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/io.element.Element.svg" +for i in 16 24 48 64 96 128 256 512; do + install -Dm644 build/icons/${i}x${i}.png "%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/io.element.Element.png" +done + +%files +%license LICENSE +%{_bindir}/%{name} +%{_prefix}/lib/element/ +%{_sysconfdir}/webapps/element/config.json +%{_datadir}/webapps/element/config.json +%{_sysconfdir}/element/ +%{_datadir}/applications/io.element.Element.desktop +%{_datadir}/icons/hicolor/scalable/apps/io.element.Element.svg +%{_datadir}/icons/hicolor/*/apps/io.element.Element.png + +%changelog diff --git a/element-web-1.7.31.tar.gz b/element-web-1.7.31.tar.gz new file mode 100644 index 0000000..e818fa2 --- /dev/null +++ b/element-web-1.7.31.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f12a563a02fe9be3e3acf22d2d2587c66f345d3cefb57d86cd6727172f656dfc +size 1354034 diff --git a/io.element.Element.desktop b/io.element.Element.desktop new file mode 100644 index 0000000..6fbf5e3 --- /dev/null +++ b/io.element.Element.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Element +Comment=Feature-rich client for Matrix +Exec=/usr/bin/element-desktop %u +Terminal=false +Type=Application +Icon=io.element.Element +StartupWMClass=Element +Categories=Network;InstantMessaging;Chat;IRCClient +MimeType=x-scheme-handler/element; diff --git a/prepare_tarball.sh b/prepare_tarball.sh new file mode 100644 index 0000000..0c62ab9 --- /dev/null +++ b/prepare_tarball.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -ex + +oldwd="$(pwd)" +tmpdir="$(mktemp -d)" + +#zypper install yarn cargo gcc-c++ sqlcipher-devel libsecret-devel + +version=$(grep "Version:" element-desktop.spec | awk '{print $2}') +wget -c https://github.com/vector-im/element-desktop/archive/v${version}.tar.gz -O element-desktop-${version}.tar.gz +wget -c https://github.com/vector-im/element-web/archive/v${version}.tar.gz -O element-web-${version}.tar.gz +cp element-desktop.spec "$tmpdir/" +cd "$tmpdir" + +rm -rf "element-desktop-${version}" +wget -c https://github.com/vector-im/element-desktop/archive/v${version}.tar.gz -O element-desktop-${version}.tar.gz +tar xzvf element-desktop-${version}.tar.gz +cd element-desktop-${version} + +sed -i 's@"electronVersion": "11.2.3"@"electronVersion": "13.1.2"@g' package.json +sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json + +yarn install +export PATH="$PATH:node_modules/.bin" +yarn run build:native +yarn run build +tar czvf ../dist.tar.gz dist/linux-unpacked/resources/ +cd .. +cp dist.tar.gz "$oldwd/" +cd "$oldwd" +rm -rf "$tmpdir" +#rm -rf "element-desktop-${version}" +echo -e "\n\nDONE creating output file 'dist.tar.gz'"