.....Neo"
Matrixchannel:
#www.suseforum.de:matrix.org
Blue or Red pill?
Greetz,
RM
Matrixchannel:
#www.suseforum.de:matrix.org
Blue or Red pill?
Greetz,
RM
#
# spec file for package element-desktop
#
# Copyright (c) 2020 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/
#
%bcond_with srpm
%global __provides_exclude_from ^%{_libdir}/Element/.*\\.so$
%global __requires_exclude ^.*(ffmpeg|widevinecdm).*$
Name: element-desktop
Version: 1.7.1
Release: 1.1
Summary: A feature-rich desktop client for Matrix.org
License: MIT and Apache-2.0
Group: Productivity/Networking/Web/Browsers
Url: https://element.io
Source0: https://packages.riot.im/debian/pool/main/e/element-desktop/element-desktop_%{version}_amd64.deb
%if !%{with srpm}
NoSource: 0
%endif
BuildRequires: build
BuildRequires: build-mkbaselibs
BuildRequires: chrpath
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
Buildrequires: dpkg
Buildrequires: pkg-config
BuildRequires: pkgconfig(sqlcipher)
PreReq: permissions
Obsoletes: riot-web < %{version}
Obsoletes: riot-desktop < %{version}
Provides: riot-web = %{version}
Provides: riot-desktop = %{version}
%if 0%{suse_version} == 1500
### Leap 15.x
Requires: libsqlcipher-3_20_1-0
%endif
%if 0%{suse_version} > 1500
### Tumbleweed
Requires: libsqlcipher-3_30_1-0
%endif
ExclusiveArch: x86_64
%description
A feature-rich client for Matrix.org (standalone desktop client built with electron).
%prep
%setup -q -c -T
dpkg -x %{SOURCE0} .
gunzip usr/share/doc/%{name}/*.gz
%build
# Nothing to build.
%install
install -d \
%{buildroot}%{_bindir} \
%{buildroot}%{_libdir} \
%{buildroot}%{_datadir}
find . -type f | xargs chmod 644
find . -type d | xargs chmod 755
find . -type f -iname "*.so" | xargs strip
strip opt/Element/{*sandbox,%{name}}
chmod 755 opt/Element/{*sandbox,%{name}}
cp -a usr %{buildroot}
cp -a opt/Element %{buildroot}%{_libdir}/
rm -rf %{buildroot}/%{_datadir}/doc %{buildroot}%{_libdir}/Element/LICENSE*
sed -i "s|Exec=.*|Exec=%{name} %U|g" %{buildroot}%{_datadir}/applications/%{name}.desktop
ln -sf ../%{_lib}/Element/%{name} %{buildroot}%{_bindir}/%{name}
export LIBSQLCIPHER_LIB="$(basename %{_libdir}/libsqlcipher*.so.0)"
echo "Creating symlink to $LIBSQLCIPHER_LIB"
ln -sf ../"$LIBSQLCIPHER_LIB" %{buildroot}/%{_libdir}/Element/libsqlcipher.so.0
%suse_update_desktop_file %{name}
%fdupes %{buildroot}%{_libdir}
%pre
if [ "$1" -eq 1 ] ; then
grep ^flags /proc/cpuinfo | grep -qs sse2
if [ $? -ne 0 ]; then
echo "This computer cannot run %{name} because its hardware is no longer \
supported." 1>&2; exit 1
fi
fi
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%defattr(-,root,root,0755)
%license opt/Element/LICENSE*
%doc usr/share/doc/%{name}/*
%{_bindir}/%{name}
%{_libdir}/Element
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%changelog
sudo zypper in rpm-build chrpath sqlcipher-devel
cd $HOME
mkdir -p rpmbuild/SPECS rpmbuild/SOURCES rpmbuild/SRPMS rpmbuild/RPMS/{noarch,x86_64} rpmbuild/BUILD rpmbuild/BUILDROOT
wget -c https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/kiIoUAytwkgRAQyfNeBeAXbc -O $HOME/rpmbuild/SPECS/element-desktop.spec
%bcond_with srpm
%bcond_without srpm
wget -c https://packages.riot.im/debian/pool/main/e/element-desktop/element-desktop_1.7.1_amd64.deb -O $HOME/rpmbuild/SOURCES/element-desktop_1.7.1_amd64.deb
rpmbuild -ba $HOME/rpmbuild/SPECS/element-desktop.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.RmIX0l
+ umask 022
+ cd /home/ICH/rpmbuild/BUILD
+ cd /home/ICH/rpmbuild/BUILD
.......
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ICH/rpmbuild/BUILDROOT/element-desktop-1.7.1-1.1.x86_64
Wrote: /home/ICH/rpmbuild/SRPMS/element-desktop-1.7.1-1.1.src.rpm
Wrote: /home/ICH/rpmbuild/RPMS/x86_64/element-desktop-1.7.1-1.1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.OWQN3b
+ umask 022
+ cd /home/ICH/rpmbuild/BUILD
+ cd element-desktop-1.7.1
+ /usr/bin/rm -rf /home/ICH/rpmbuild/BUILDROOT/element-desktop-1.7.1-1.1.x86_64
+ rm -rf filelists
Version: 1.7.2
wget -c https://packages.riot.im/debian/pool/main/e/element-desktop/element-desktop_1.7.2_amd64.deb -O $HOME/rpmbuild/SOURCES/element-desktop_1.7.2_amd64.deb