File matrix-quaternion.spec of Package matrix-quaternion
#
# spec file for package matrix-quaternion
#
# Copyright (c) 2024 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: matrix-quaternion
Version: 0.0.96.1+5~git20240227.2d72030
Release: 0
Summary: QT Matrix client
License: GPL-3.0-only
Group: Productivity/Networking/Instant Messenger
# /%{name}-%{version}.tar.gz#/Quaternion-%{version}.tar.gz
URL: https://github.com/quotient-im/Quaternion
#Source0: https://github.com/quotient-im/Quaternion/archive/%{version}/matrix-quaternion-%{version}.tar.gz
Source0: matrix-quaternion-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
# comes bundled now
#BuildRequires: pkgconfig(QMatrixClient) >= 0.6.0
BuildRequires: cmake(Olm) >= 3.2.5
BuildRequires: cmake(Qt6Keychain)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(QtOlm)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Core) >= 5.9
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Multimedia)
BuildRequires: pkgconfig(Qt6Network)
BuildRequires: pkgconfig(Qt6Qml)
BuildRequires: pkgconfig(Qt6Quick)
BuildRequires: pkgconfig(Qt6QuickControls2)
BuildRequires: pkgconfig(Qt6QuickWidgets)
BuildRequires: pkgconfig(Qt6Sql)
BuildRequires: pkgconfig(Qt6Test)
BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(QuotientQt6) >= 0.8
BuildRequires: pkgconfig(openssl)
Requires: %{name}-lang
#Requires: libqt5-qtquickcontrols
#Requires: libqt5-qtquickcontrols2
Conflicts: matrix-quaternion-git
Provides: Quotient = %{version}
#Provides: libQMatrixClient = %{version}
#Provides: libQuotient = %{version}
#Provides: libqmatrixclient = %{version}
Provides: matrix-quaternion-git = %{version}
Provides: quaternion = %{version}
Provides: quaternion-git = %{version}
%if 0%{?suse_version} > 1500
BuildRequires: gcc-c++
%else
BuildRequires: gcc11-c++
%endif
%description
Quaternion is a desktop IM client for the Matrix protocol using QT.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Provides: libQMatrixClient-devel = %{version}
Provides: libQuotient-devel = %{version}
Provides: libqmatrixclient-devel = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%lang_package
%prep
#autosetup -p1 -n Quaternion-%{version}
%setup -q
# Wan't extern libQuotient package
rm -rf ./lib
%build
export LDFLAGS="-pie"
export CFLAGS="%{optflags} -fPIE -pie"
export CXXFLAGS="%{optflags} -fPIE -pie"
%if 0%{?suse_version} <= 1500
export CC=gcc-11
export CXX=g++-11
%endif
%cmake \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_WITH_QT6=ON \
-DUSE_INTREE_LIBQOLM=OFF \
-DQuotient_ENABLE_E2EE=ON
%make_jobs
%install
%cmake_install
%post -p /sbin/ldconfig
%if 0%{?suse_version} < 1500
%icon_theme_cache_post
%endif
%postun -p /sbin/ldconfig
%if 0%{?suse_version} < 1500
%icon_theme_cache_postun
%endif
%files
%license LICENSES
%doc README.md
%{_bindir}/*
#{_libdir}/lib*.so.*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*
%dir %{_datadir}/Quotient
%dir %{_datadir}/Quotient/quaternion
%{_datadir}/metainfo/*
%files lang
%{_datadir}/Quotient/quaternion/translations/
%files devel
#{_libdir}/lib*.so
#{_includedir}/Quotient/
#{_libdir}/pkgconfig/Quotient.pc
#{_libdir}/cmake/Quotient/
#{_datadir}/ndk-modules/
%changelog