2020-07-16 18:50:47 +03:00
|
|
|
# To avoid out of memory error
|
|
|
|
%define _build_pkgcheck_set %{nil}
|
|
|
|
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
2020-08-05 21:53:16 +03:00
|
|
|
%define oname element-desktop
|
2020-07-16 18:50:47 +03:00
|
|
|
%define _riotdir /opt/element
|
|
|
|
|
2020-08-17 16:19:21 +03:00
|
|
|
%define __noautoreqfiles /opt/element/resources
|
2020-07-16 18:50:47 +03:00
|
|
|
%define __noautoreq 'libffmpeg.so*|libnode.so*'
|
|
|
|
|
|
|
|
Summary: Client for the decentralized and secure protocol Matrix
|
|
|
|
Name: element
|
2024-06-20 08:31:33 +00:00
|
|
|
Version: 1.11.69
|
2021-09-14 15:37:10 +03:00
|
|
|
Release: 1
|
2020-07-16 18:50:47 +03:00
|
|
|
License: ASL 2.0
|
|
|
|
Group: Networking/Instant messaging
|
2021-05-17 16:59:51 +03:00
|
|
|
URL: https://element.io
|
2020-07-16 18:50:47 +03:00
|
|
|
Source0: https://github.com/vector-im/%{oname}/archive/v%{version}/%{oname}-%{version}.tar.gz
|
2023-01-21 09:00:20 +03:00
|
|
|
Source1: https://github.com/vector-im/element-web/releases/download/v%{version}/%{name}-v%{version}.tar.gz
|
2021-10-12 15:48:43 +03:00
|
|
|
ExclusiveArch: x86_64
|
2020-07-16 18:50:47 +03:00
|
|
|
BuildRequires: yarn
|
2024-06-20 08:31:33 +00:00
|
|
|
BuildRequires: nodejs-bootstrap-bin >= 16
|
2023-04-26 13:21:57 +00:00
|
|
|
#BuildRequires: nodejs14
|
2020-07-16 18:50:47 +03:00
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: curl
|
|
|
|
BuildRequires: imagemagick
|
2021-09-13 13:28:39 +03:00
|
|
|
BuildRequires: pkgconfig(sqlcipher)
|
2023-04-26 13:21:57 +00:00
|
|
|
BuildRequires: python38-devel
|
2020-07-16 18:50:47 +03:00
|
|
|
%ifarch i386 i486 i586 i686 x86
|
|
|
|
BuildRequires: nodejs-rimraf
|
|
|
|
%endif
|
|
|
|
AutoProv: no
|
|
|
|
Provides: riot == %{version}
|
2023-04-26 13:21:57 +00:00
|
|
|
#Conflicts: nodejs-bootstrap-bin
|
2020-07-16 18:50:47 +03:00
|
|
|
|
|
|
|
%description
|
|
|
|
Element (oldname Riot) is a decentralized, secure messaging client for
|
|
|
|
collaborative group communication. Element's core architecture is an
|
|
|
|
implementation of the Matrix protocol.
|
|
|
|
|
|
|
|
Element is more than a messaging app. Riot is a shared workspace for the web.
|
|
|
|
Element is a place to connect with teams. Riot is a place to to collaborate,
|
|
|
|
to work, to discuss your current projects.
|
|
|
|
|
|
|
|
Element removes the barriers between apps, allowing you to connect teams and
|
|
|
|
functionality like never before.
|
|
|
|
|
|
|
|
Element is free. Element is secure.
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/%{name}*
|
|
|
|
%{_datadir}/applications/%{name}*.desktop
|
|
|
|
%{_iconsdir}/hicolor/*/apps/%{name}.*
|
|
|
|
%{_riotdir}/*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qn %{oname}-%{version}
|
|
|
|
|
2024-06-20 08:31:33 +00:00
|
|
|
sed -i '/node/s/18.0.0/16.0.0/' package.json
|
|
|
|
|
2020-07-16 18:50:47 +03:00
|
|
|
%build
|
2023-04-26 13:21:57 +00:00
|
|
|
export PATH=$PATH:/opt/nodejs/16.*/bin
|
|
|
|
export PYTHONPATH=%{python38_sitelib}
|
|
|
|
export PYTHON3=/usr/libexec/python3.8
|
|
|
|
export PYTHON=/usr/libexec/python3.8
|
|
|
|
|
|
|
|
yarn config set --home enableTelemetry 0
|
2021-09-14 16:14:05 +03:00
|
|
|
|
2023-01-21 09:00:20 +03:00
|
|
|
mkdir -p packages deploys
|
|
|
|
|
|
|
|
pushd deploys
|
|
|
|
tar -xf %{SOURCE1}
|
|
|
|
popd
|
|
|
|
|
|
|
|
yarn
|
|
|
|
#yarn clean
|
2021-09-14 11:31:24 +03:00
|
|
|
yarn run fetch --noverify --cfgdir 'element.io/release'
|
2021-09-13 13:28:39 +03:00
|
|
|
|
2021-09-14 11:31:24 +03:00
|
|
|
cp element.io/release/config.json config.json
|
2020-07-16 18:50:47 +03:00
|
|
|
|
2023-01-20 11:50:13 +03:00
|
|
|
yarn run build --dir
|
2020-07-16 18:50:47 +03:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_riotdir}
|
2023-01-20 11:50:13 +03:00
|
|
|
cp -a dist/linux-*/* %{buildroot}%{_riotdir}
|
|
|
|
|
2020-07-16 18:50:47 +03:00
|
|
|
|
|
|
|
# install binary wrapper
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
|
|
|
#!/bin/bash
|
|
|
|
cd %{_riotdir}
|
|
|
|
./element-desktop
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > %{buildroot}%{_bindir}/%{name}-tor << EOF
|
|
|
|
#!/bin/bash
|
|
|
|
cd %{_riotdir}
|
|
|
|
./element-desktop --proxy-server="socks5://127.0.0.1:9050" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod 755 %{buildroot}%{_bindir}/%{name}*
|
|
|
|
|
|
|
|
# install menu entry
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/applications/
|
|
|
|
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Element
|
|
|
|
Comment=Client for the decentralized and secure protocol Matrix
|
|
|
|
Exec=%{name}
|
|
|
|
Icon=%{name}
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
StartupNotify=true
|
|
|
|
Categories=Network;InstantMessaging;
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > %{buildroot}%{_datadir}/applications/%{name}-tor.desktop << EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Element-tor
|
|
|
|
Comment=Client for the decentralized and secure protocol Matrix over Tor
|
|
|
|
Exec=%{name}-tor
|
|
|
|
Icon=%{name}
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
StartupNotify=true
|
|
|
|
Categories=Network;InstantMessaging;
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# install menu icons
|
|
|
|
pushd res/img
|
|
|
|
for N in 16 22 24 32 48 128 256;
|
|
|
|
do
|
|
|
|
install -d %{buildroot}%{_iconsdir}/hicolor/${N}x${N}/apps
|
|
|
|
convert -resize ${N}x${N} element.png %{buildroot}%{_iconsdir}/hicolor/${N}x${N}/apps/%{name}.png
|
|
|
|
done
|
|
|
|
popd
|