# # spec file for package element-desktop # # Copyright (c) 2023 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.11.76 Release: 1%{?dist} 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}/element-desktop-%{version}.tar.gz Source2: vendor.tar.zst Source3: io.element.Element.desktop Source4: element-desktop.sh Source5: prepare.sh #Patch1: 7za-path.patch Patch10: electron-builder_back_to_package.json.patch BuildRequires: cargo BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: jq BuildRequires: moreutils BuildRequires: nodejs BuildRequires: nodejs-electron-devel BuildRequires: pkgconfig(openssl) BuildRequires: zstd BuildRequires: yarnpkg BuildRequires: rust BuildRequires: python3 BuildRequires: python3-setuptools BuildRequires: sqlcipher-devel BuildRequires: libsecret-devel BuildRequires: gcc-c++ Requires: element-web = %{version} Requires: nodejs-electron%{?_isa} # hak*.tar.gz only available for those architectures ExclusiveArch: x86_64 aarch64 %description A glossy Matrix collaboration client - desktop %prep %setup -q -a2 %autopatch -p1 # https://blogs.gnome.org/mcatanzaro/2020/05/18/patching-vendored-rust-dependencies/ for i in cc libloading libsqlite3-sys openssl-src rustix seshat vcpkg; do pushd .hak/matrix-seshat/x86_64-unknown-linux-gnu/build/vendor/$i jq -cj '.files={}' .cargo-checksum.json >tmp && mv tmp .cargo-checksum.json && popd done jq -cj '.piwik=false | .update_base_url=null' < element.io/release/config.json > tmp && mv -v tmp element.io/release/config.json %ifarch aarch64 mv -v .hak/matrix-seshat/x86_64-unknown-linux-gnu .hak/matrix-seshat/aarch64-unknown-linux-gnu mv -v .hak/keytar/x86_64-unknown-linux-gnu .hak/keytar/aarch64-unknown-linux-gnu %endif %build echo 'yarn-offline-mirror "./npm-packages-offline-cache"' >> .yarnrc export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 #export NODE_OPTIONS=--openssl-legacy-provider yarn install --pure-lockfile yarn run hak build yarn run hak copyandlink #Compare definition of `build:universal` in package.json yarn run build:ts yarn run build:res npx --no-install electron-builder --linux dir --universal -c.electronDist=%{_libdir}/electron %install # Install the app content, replace the webapp with a symlink to the system package install -d -m 0755 "%{buildroot}%{_datadir}/element/" cp -av dist/linux-universal-unpacked/resources/* %{buildroot}%{_datadir}/element/ install -d -m 0755 %{buildroot}%{_prefix}/lib/element/ install -m0755 dist/linux-universal-unpacked/resources/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node %{buildroot}%{_datadir}/element/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node install -m0755 dist/linux-universal-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/index.node %{buildroot}%{_datadir}/element/app.asar.unpacked/node_modules/matrix-seshat/index.node # Config file install -m 0755 -d %{buildroot}%{_sysconfdir}/element install -m 0644 element.io/release/config.json %{buildroot}%{_sysconfdir}/element/config.json install -m 0755 -d %{buildroot}%{_datadir}/element/webapp ln -sr %{buildroot}%{_sysconfdir}/element/config.json %{buildroot}%{_datadir}/element/webapp/config.json # Required extras install -d -m 0755 %{buildroot}%{_datadir}/applications/ install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/applications/io.element.Element.desktop install -d -m 0755 %{buildroot}%{_bindir}/ install -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/%{name} # Icons for i in 16 24 48 64 96 128 256 512; do install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/ install -m 0644 build/icons/${i}x${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/io.element.Element.png done %fdupes %{buildroot}%{_datadir} %files %license LICENSE %dir %{_sysconfdir}/element/ %config(noreplace) %{_sysconfdir}/element/config.json %{_bindir}/%{name} %{_datadir}/element/ %{_datadir}/applications/io.element.Element.desktop %{_datadir}/icons/hicolor/*/apps/io.element.Element.png %changelog * Wed Sep 11 2024 Sérgio Basto - 1.11.76-1 - Update to 1.11.76 * Wed Jul 03 2024 Sérgio Basto - 1.11.69-5 - v3 02 * Tue Jul 02 2024 Sérgio Basto - 1.11.69-4 - v3 01 * Sat Jun 29 2024 Sérgio Basto - 1.11.69-3 - v2.5 * Fri Jun 28 2024 Sérgio Basto - 1.11.69-2 - Update to 1.11.69 * Tue Jun 25 2024 Sérgio Basto - 1.11.67-1 - Update to 1.11.67 * Tue May 28 2024 Sérgio Basto - 1.11.67-2 - add NODEJS_DEFAULT_VER * Fri Apr 26 2024 Sérgio Basto - 1.11.65-1 - Update to 1.11.65 * Mon Mar 25 2024 Sérgio Basto - 1.11.61-1 - 1.11.61 * Wed Mar 06 2024 Sérgio Basto - 1.11.58-5 - build with new electron * Sat Mar 02 2024 Sérgio Basto - 1.11.58-4 - BR: python3-setuptools * Wed Feb 21 2024 Sérgio Basto - 1.11.58-3 - update * Sun Feb 18 2024 Sérgio Basto - 1.11.58-2 - 1.11.58