commit e453e01b9fa6675085b65790dc11233a4b6e34b72432fefaaa7a18f55a7454c7 Author: Dead Mozay Date: Fri Dec 20 16:55:25 2024 +0000 Update to 0.9.1 OBS-URL: https://build.opensuse.org/package/show/network:messaging:matrix/libQuotient?expand=0&rev=35 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/_multibuild b/_multibuild new file mode 100644 index 0000000..efd479f --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + qt6 + + diff --git a/libQuotient-0.8.2.tar.gz b/libQuotient-0.8.2.tar.gz new file mode 100644 index 0000000..1124f2a --- /dev/null +++ b/libQuotient-0.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12ff2fa8b80a934b9dd88fa3416a4b88e94bc0e18a8df0dcebfc90614dd2f5c9 +size 744095 diff --git a/libQuotient-0.9.0.tar.gz b/libQuotient-0.9.0.tar.gz new file mode 100644 index 0000000..211ac2b --- /dev/null +++ b/libQuotient-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e607eb978a5daa82e2186cd92f0d964cb820c72cfad95ed2adda4525ed923b5 +size 771510 diff --git a/libQuotient-0.9.1.tar.gz b/libQuotient-0.9.1.tar.gz new file mode 100644 index 0000000..2f717b1 --- /dev/null +++ b/libQuotient-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a1fd19c9f6e4d93c60fbec5ab4ca84961781e6d00105a4437ecd14aaea36bc9 +size 772882 diff --git a/libQuotient.changes b/libQuotient.changes new file mode 100644 index 0000000..2181201 --- /dev/null +++ b/libQuotient.changes @@ -0,0 +1,509 @@ +------------------------------------------------------------------- +Fri Dec 20 14:19:50 UTC 2024 - Christophe Marin + +- Update to 0.9.1 + * Added Connection::isOnline() + * Room::pendingEventAdded() signal doesn't carry a dangling + event ref any more + * MediaThumbnailJob now checks for the correct spec version + for auth media + * Unsupported RoomType values don't litter logs with warnings + any more + * Cleanup and code modernization + * Access tokens are actually saved to the keychain again + * The text provided by the server is used for the error + message on media endpoints + * Connection::supportedMatrixSpecVersions() regression fix + * Downloading encrypted files to a temporary location fixed + * Configurable job backoff strategies; fix the regression with + syncs frequently timing out just before getting a response + from the homeserver + +------------------------------------------------------------------- +Mon Oct 28 09:02:30 UTC 2024 - Christophe Marin + +- Fix dependencies + +------------------------------------------------------------------- +Mon Oct 28 07:11:46 UTC 2024 - Christophe Marin + +- Update to 0.9.0 + * Qt 6 only + * cross-signing support (requires UI to match on the client + side; NeoChat already has it) + * Matrix 1.12 API + * completed separation of room member functionality previously + delivered by the User class, to a dedicated RoomMember class + * introduction of futures to replace signals for one-off + asynchronous calls, especially relevant for calls returning + job pointers + * refactoring of the event content API to make transition to + extensible events easier in the future +- Remove the default build flavor but keep the _multibuild setup +- Remove obsolete build options + +------------------------------------------------------------------- +Wed Apr 24 08:40:39 UTC 2024 - Christopher Hock + +- Add qt6-sql-sqlite to BuildRequires to allow Qt6 build to pass +- Update to 0.8.2 + * Historical encrypted messages can now be decrypted with old + megolm keys retrieved from SSSS + (gh#quotient-im/libQuotient#687) + * The User library API is getting prepared to be split into + that for room members (RoomMember) and user profiles + (stays in User for now) in 0.9, is deprecating mos of User + methods that accept Room for the member context + (gh#quotient-im/libQuotient#685) + * Along the same lines: functions to (un)ignore users by userid + rather than User* are introduced; the old signatures are + deprecated now and will be removed in 0.9 + (gh#quotient-im/libQuotient#718) + * More efficient (less cache-wasting) avatar retrieval + (gh#quotient-im/libQuotient#711) + * Property for querying conection's account_data + (gh#quotient-im/libQuotient#719) + * Fix brain-split when checking the event types on some Linux + distributions + (gh#quotient-im/libQuotient#726) + (gh#quotient-im/libQuotient#692) + * A new event class for m.room.server_acl + (gh#quotient-im/libQuotient#729) + * The library supports defaulting direct chats to E2EE now + (gh#quotient-im/libQuotient#730) + +------------------------------------------------------------------- +Wed Mar 13 21:01:31 UTC 2024 - Bernhard Wiedemann + +- Move install commands into %install section + +------------------------------------------------------------------- +Wed Sep 13 12:07:48 UTC 2023 - ecsos + +- Update to 0.8.1.2 + * It turned out that version 0.8.1 is not entirely ABI compatible + with 0.8.0 as it should. This release is made solely to fix it; + there are no other changes. + +------------------------------------------------------------------- +Mon Sep 11 13:11:30 UTC 2023 - Enrico Belleri + +- Add Qt5DBus as build requirement + * fixes Leap 15.5 build + +------------------------------------------------------------------- +Sat Aug 19 21:37:21 UTC 2023 - Christophe Marin + +- Update to 0.8.1.1 + * Got rid of deprecated RoomPinnedEvent name + (gh#quotient-im/libQuotient#680) + * Fixed session verification (gh#quotient-im/libQuotient#682) + * Constified Room::userIdsAtEvent() + (gh#quotient-im/libQuotient#686) + * Enhanced logging around key verification + (gh#quotient-im/libQuotient#690) + * Made it possible to use the key backup client-server API + in the backend (gh#quotient-im/libQuotient#693) + * Constrained the e-mail logic in linkifyUrl() so that it + doesn't trigger in the middle of another URL + (gh#quotient-im/libQuotient#698) + +------------------------------------------------------------------- +Wed Aug 9 17:21:54 UTC 2023 - Christophe Marin + +- Update to 0.8.0. Check + https://github.com/quotient-im/libQuotient/releases for older + changes list. + * Fixed AccountRegistry::invokeLogin() to still add Connection + objects after successfully connecting them to the homeserver + (gh#quotient-im/libQuotient#675) + * pinned events actually follow the specification (and + therefore, interoperable) (gh#quotient-im/libQuotient#677) +- Add a Qt6 flavor. Needed by the KDE CI +- Enable E2EE by default. This will be required by neochat soon. + +------------------------------------------------------------------- +Wed Dec 21 04:58:08 UTC 2022 - Dead Mozay + +- Update to version 0.7.0: + * E2EE is the biggest part of this release, + + The following parts of E2EE are known to work: + - foundations additional contributions and refactoring. + - Olm/Megolm signalling with our parties/devices. + - managing device and one-time keys. + - sending and receiving (monstrous new encrypted messages. + - encrypting/decrypting attachment. + - retrieval and decryption of historical messages keys + for which are already in the database. + - device verification. + + What is not there yet: + - historical Megolm sessions are not requested from other + devices/parties, so you will see quite a few undecryptable + messages in rooms with past communication - this might be + fixed (if possible without breaking the API) in further + 0.7.x releases. + - secure server-side storage (SSSS) is not supported at + all for now, and will likely require API breakage so + will come in 0.8. + - soft logout is not supported; this is also a subject of 0.8. + + Because there's no soft logout the database for a given account + is completely reset upon a successful login attempt. This may + come as a very unpleasant surprise if you don't keep your + login session between client restarts; but this is a necessary + trade-off for the current feature set (see #546 for the + discussion). Together with the rest of the above not-there-yet + list, this means that you MUST NOT use E2EE with + libQuotient-backed clients as your only device(s) on + the account - there's quite a risk of losing encrypted + conversations if anything happens to the database libQuotient + keeps key material in, or if you lose your session and have + to log in again. Did I mention the whole E2EE functionality + is still in beta? Client authors are strongly recommended + to show big scary warnings against E2EE for now. + * Read markers -> read receipts + fully read markers. + +------------------------------------------------------------------- +Thu Oct 7 08:37:12 UTC 2021 - Dead Mozay + +- Update to version 0.6.11: + * Just after 0.6.10 was out another nasty bug has been discovered, + preventing from proper usage of URLs with an unescaped double-hash (##), + which may come when a matrix.to URL is generated for a bridged IRC channel + (and it even got a very nice number #512). Aside from this fix, + quotest will not return with success code 0 any more if it failed to + even start testing for some reason (#496). + +------------------------------------------------------------------- +Sun Oct 3 08:21:09 UTC 2021 - Dead Mozay + +- Update to versiosn 0.6.10: + * Yet another maintenance release of the stable branch, fixing an + issue (#510) with invites not showing up in some cases + (especially on less active/smaller accounts). + +------------------------------------------------------------------- +Sun Sep 12 10:55:22 UTC 2021 - Dead Mozay + +- Update to version 0.6.9: + * Here's one more stable branch release of libQuotient, + fixing a rare assertion failure due to uninitialised + read marker when new events arrive and all history + is already loaded. + +------------------------------------------------------------------- +Tue Aug 24 06:45:25 UTC 2021 - Dead Mozay + +- Update to version 0.6.8: + * Retain the current room member avatar when renaming the user + for the room. + * When displaying the room, notification/highlight counters are + no more reset. This never really worked, with the notification + and highlight counts jumping to zero and then back to the + original value if the timeline hasn't been completely read; + now that read receipts are correctly sent, the counters + can be left to the homeserver to update + (while E2EE is not around). + * Fix the missing percent encoding in User::fetchProfile(), + leading to problems around historical userids that still + have slashes. + * CS API files have been regenerated from the new matrix-doc + after revamping the layout and tooling; the library API didn't + change, but doc-comments are now in Markdown rather than + ReStructured Text. + * Update GTAD configuration to version 0.8 of the tool. + * Fix potential linking errors around quotient_common.h. + +------------------------------------------------------------------- +Sun Jul 18 14:09:53 UTC 2021 - Fabian Vogt + +- Updae to version 0.6.7: + * One more maintenance release at the stable branch, fixing + gh#quotient-im/libQuotient#471 that affects NeoChat - thanks + to @ognarb for pinpointing and suggesting a fix to it. +- Mention soversion in %files +- Simplify %files +- Use full tarball name +- Don't install quotest and ndk-modules/Android.mk + +------------------------------------------------------------------- +Thu Mar 18 05:51:58 UTC 2021 - Dead Mozay + +- Update to version 0.6.6: + * Another update on the stable branch, to address #456 + (possible crash on some malformed user ids). + +------------------------------------------------------------------- +Wed Feb 24 04:42:02 UTC 2021 - Dead Mozay + +- Update to version 0.6.5: + * Fix rich replies handling. + * Support abbreviated aka Reddit-style type specifiers in + Matrix URIs (e.g., matrix:r/quotient:matrix.org) + +------------------------------------------------------------------- +Sat Jan 16 15:40:44 UTC 2021 - Luca Beltrame + +- Actually disable e2ee + +------------------------------------------------------------------- +Fri Jan 15 16:17:38 UTC 2021 - Dead Mozay + +- Update to version 0.6.4: + * Several fixes around homeserver resolution. + +------------------------------------------------------------------- +Sun Jan 3 19:29:38 UTC 2021 - Luca Beltrame + +- Add a build conditional for E2EE and disable it by default, as + applications using libQuotient with E2EE enabled have + stability issues and memory leaks +- Run spec-cleaner + +------------------------------------------------------------------- +Tue Dec 29 07:35:30 UTC 2020 - Dead Mozay + +- Update to version 0.6.3: + * (#412 with an additional fix in e7c9ca9) Take profile data from + the previous user state for users who already left + * (693241d) Fix defunct network requests stalling the request queue + * (e81117f, 6e8be18) Minor performance improvements on loading + rooms and accounts involving many users (0.7 will have more work + on handling that) + * (2340f3d) Power level events are properly redacted now locally + * (ff2cb9f) Work around lack of native Qt support for request + bodies in DELETE requests + * (97b0bec) Fix a few cases of insufficient escaping in + Quotient::Uri (thanks to nephele for reporting) + * (#421) Fix incorrect processing when a network request + (especially for .well-known) returns 404 with non-empty body + that is not JSON (which is quite usual when a .well-known + record is missing) + * (66972c8) Room tags that start with . (fullstop) are no more + considered correct and will get u. in front of them. + * Many thanks for all the help in testing and contributing! + +------------------------------------------------------------------- +Sat Oct 24 09:17:37 UTC 2020 - dead-mozay@opensuse.org + +- Update to version 0.6.2: + * More stringent serverpart checks in user ids. + * Uri::toUrl() now returns an actually working matrix.to link. + * The biggest change in this release is a rewrite of the code + maintaining user profiles (generic and per-room). + The new code is simpler, faster and occupies less memory - + a hat-trick of optimisation. The improvement is most noticeable + when opening bigger rooms with many users (such as Matrix HQ). + * Trying to set displayname or avatar URL to an empty value with + Synapse homeservers led to an obscure error; + now it works as it should. + * Another noticeable change is that the library should be more + robust against gateway/CDN/proxy errors that sometimes bring + unexpected responses (e.g. an HTML payload when JSON is expected). + * Quotest: added a test for changing the user display name + * User::bridged() and User::rawName() has long been useless, + as Matrix stopped using bridge postfixes - they are deprecated now. + * Smaller optimisations, cleanup and documentation updates, as usual. + +------------------------------------------------------------------- +Fri Jul 24 16:37:51 UTC 2020 - Marcel Kuehlhorn + +- Update to 0.6.0 stable + +------------------------------------------------------------------- +Tue Jun 9 23:08:47 UTC 2020 - Marcel Kuehlhorn + +- Update to 0.6-beta1 + * actually build against the packaged libQtOml instead of the + intree version + +------------------------------------------------------------------- +Sat Feb 22 10:51:12 UTC 2020 - dead_mozay@opensuse.org + +- Update to version 0.6.0: + * Fix build on big-endian systems + * Use parsed RoomPowerLevelsEvent in room upgrading + * Add powerLevelForState() + * Mark methods as const. + +------------------------------------------------------------------- +Fri May 24 08:11:45 UTC 2019 - ecsos@opensuse.org + +- Update to 0.5.2 + - (#323) Direct chats are no more unmarked when logging in or + after clearing the cache. + - 0.5.x releases keep the previous library name, libQMatrixClient + +- Upstream renamed library to libQuotient, so this package + libqmatrixclient also renamed to libQuotient. + +------------------------------------------------------------------- +Thu Apr 18 14:10:46 UTC 2019 - ecsos@opensuse.org + +- Update to 0.5.1.2 + - (#316) Expired tokens no more bring IncorrectRequestError + instead of ContentAccessError; consequently, + Connection::logout() ignores ContentAccessErrors so expired + tokens don't leave the library in a "can't go-in, can't go out" + state. + - Jobs abandoned due to Connection being deleted no more cause + crashes. + +------------------------------------------------------------------- +Sat Apr 6 12:25:50 UTC 2019 - ecsos@opensuse.org + +- Update to 0.5.1.1 + This release fixes a bug that makes 0.5.1 not being "new enough" + for Quaternion 0.0.9.4, and another bug that made user showing up + multiple times in the user list of Quaternion after renaming. + Otherwise it's the same as version 0.5.1. + +------------------------------------------------------------------- +Fri Apr 5 07:46:12 UTC 2019 - ecsos@opensuse.org + +- Update to 0.5.1 + - Fix (#303): linkification doesn't break on peculiar links. + - Fix (#310 and 27c2989): quirks in rendering room display names + have been ironed out. + - Fix: Tighter validations of URLs coming with file events + (too relaxed validations were causing the library to + assert-crash on, e.g., encrypted attachments). + - Enhancement (#305): rooms created as direct chats are now + automatically marked as m.direct for invited as well as + inviting users. + - Enhancement (#306): Room::canSwitchVersions() returns false on + rooms already upgraded (you still can disregard and call + Room::switchVersion() but you better think twice + - see matrix-org/matrix-doc#1937). + - Enhancement: Room::postFile() now first starts file upload and + then places a pending event (neatly packed with file transfer + information), rather than the other way around. Unless you do + weird things with the library's API, you shouldn't notice. + - Enhancement: LRO/RLO Unicode markers are now stripped from + display names, to curtail abuse of those. + - Feature: Connection::domain() to save client authors from + taking the domain from user MXID. + +------------------------------------------------------------------- +Wed Apr 3 09:01:26 UTC 2019 - ecsos@opensuse.org + +- Update to 0.5.0.2 + * Another bugfix release in 0.5.x branch, fixing issues with + sending read receipts and redactions in v3 rooms (#300). + +- Changes from 0.5.0.1 + * This version fixes too stringent checks in debug builds that + led to assertion crashes upon encounter with upgraded rooms. + +- Changes from 0.5 + As usual for 0.x versions, 0.5 breaks API compatibility with + previous versions; 0.4-compatible clients may or may not need + changes in order to compile with version 0.5. As usual, see diffs + in header files to track the changes and update the client code + accordingly; these release notes highlight most prominent API + changes. + + Micro-versions in 0.5.y will maintain the API and ABI. + Version 0.6 will break either API or ABI or both. + + Over 200 commits. So see for changelog + + https://github.com/QMatrixClient/libqmatrixclient/commits/0.5.0 + +------------------------------------------------------------------- +Sun Jan 13 12:42:05 UTC 2019 - Michael Vetter + + +- Update to 0.4.2.1: + * No more treat fake state events (that don't have + state_key, even if they have state-related type, e.g., m.room.topic) + as state events, turning them into unknown events instead. + +------------------------------------------------------------------- +Sun Dec 16 03:06:40 UTC 2018 - Michael Vetter + +- Update to 0.4.1 + * Fix pending events (aka local echo) not being cleaned up + properly + * Fix rooms not being correctly sorted according to their + position under tag if using Connection::roomsByTags() + * Fix incorrect SOVERSION + +------------------------------------------------------------------- +Fri Nov 9 13:00:47 UTC 2018 - ecsos@opensuse.org + +- Remove soname from devel. + +------------------------------------------------------------------- +Wed Nov 7 10:08:05 UTC 2018 - Jan Engelhardt + +- Edit RPM groups. + +------------------------------------------------------------------- +Tue Oct 16 11:45:04 UTC 2018 - ecsos@opensuse.org + +- update to 0.4.0 + So many changes and no propoer changelog from upstream. + See changes here: + https://github.com/QMatrixClient/libqmatrixclient/compare/v0.3.0.2...v0.4.0 + +------------------------------------------------------------------- +Mon Aug 20 15:55:28 UTC 2018 - ecsos@opensuse.org + +- update to 0.3.0.2 + So many changes and no proper changelog from upstream. + See changes here: + https://github.com/QMatrixClient/libqmatrixclient/compare/v0.2.1...v0.3.0.2 + +------------------------------------------------------------------- +Wed May 2 18:49:35 UTC 2018 - ecsos@opensuse.org + +- update to 0.2.1 + - Fixed an occasional crash due to dangling callbacks in avatar + fetching code + - Fixed unreliable network error handling leading to sync loop + getting "unlooped" when server is temporarily unavailable + - Fixed a regression leading to bridge postfixes not being + removed from user display names + - Fixed a regression manifesting in dysfunctional user name + disambiguation + - Added User::rawName() to get a user name together with its + bridge postfix + - Bridge names are now used as the first line of disambiguation, + with user ids being the next (and ultimate) fallback. +- remove service file + +------------------------------------------------------------------- +Thu Apr 12 08:52:06 UTC 2018 - agraul@suse.com + +- remove remove_unwanted_cmake_installations.patch + * upstream remove EXPORT_ANDROID_MK from install targets +- use service to download sources from github + +------------------------------------------------------------------- +Tue Apr 3 16:42:17 UTC 2018 - agraul@suse.com + +- add remove_unwanted_cmake_installations.patch + * this patch removes cmake install targets that are not + targeted at linux +- cleanup spec file + +------------------------------------------------------------------- +Mon Apr 2 00:43:36 UTC 2018 - agraul@suse.com + +- update to 0.2rc +- fix build + +------------------------------------------------------------------- +Mon Jan 1 22:24:49 UTC 2018 - agraul@suse.com + +- add cmake_install_target.patch + +------------------------------------------------------------------- +Mon Jan 1 22:02:26 UTC 2018 - agraul@suse.com + +- update to 0.2-q0.0.5 + +------------------------------------------------------------------- +Fri Nov 10 13:40:20 UTC 2017 - agraul@suse.com + +- inital package diff --git a/libQuotient.spec b/libQuotient.spec new file mode 100644 index 0000000..7d8d8cf --- /dev/null +++ b/libQuotient.spec @@ -0,0 +1,133 @@ +# +# spec file +# +# 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/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "qt6" +%define qt6 1 +%define pkg_suffix -qt6 +%define lib_suffix Qt6 +%define qt6_version 6.4 +%else +ExclusiveArch: do_not_build +%endif +%define soversion 0_9 +%define sonum 0.9 +%define rname libQuotient +Name: libQuotient%{?pkg_suffix} +Version: 0.9.1 +Release: 0 +Summary: Library for Qt Matrix Clients +License: LGPL-2.1-only +Group: Development/Libraries/C and C++ +URL: https://github.com/quotient-im/libQuotient +Source0: https://github.com/quotient-im/%{rname}/archive/%{version}/%{rname}-%{version}.tar.gz +BuildRequires: cmake >= 3.26 +BuildRequires: pkgconfig +%if 0%{?qt6} +BuildRequires: qt6-core-private-devel >= %{qt6_version} +BuildRequires: qt6-sql-sqlite >= %{qt6_version} +BuildRequires: cmake(Qt6Concurrent) >= %{qt6_version} +BuildRequires: cmake(Qt6Core) >= %{qt6_version} +BuildRequires: cmake(Qt6Gui) >= %{qt6_version} +BuildRequires: cmake(Qt6Keychain) +BuildRequires: cmake(Qt6Network) >= %{qt6_version} +BuildRequires: cmake(Qt6Test) >= %{qt6_version} +%endif +BuildRequires: cmake(Olm) >= 3.2.5 +BuildRequires: pkgconfig(openssl) +%if 0%{?qt6} +BuildRequires: cmake(Qt6Sql) >= %{qt6_version} +Requires: qt6-sql-sqlite >= %{qt6_version} +%endif + +%description +Library for Qt-based Matrix chat clients. It is required by +Quaternion. + +%package -n libQuotient%{?qt6:%{lib_suffix}-}%{soversion} +Summary: Library for Qt Matrix Clients +Group: System/Libraries + +%description -n libQuotient%{?qt6:%{lib_suffix}-}%{soversion} +Library for Qt-based Matrix chat clients. It is required by +Quaternion. + +%package -n libQuotient%{?pkg_suffix}-devel +Summary: Development files for libQuotient +Group: Development/Libraries/C and C++ +Requires: libQuotient%{?qt6:%{lib_suffix}-}%{soversion} = %{version} +%if 0%{?qt6} +Requires: cmake(Qt6Gui) >= %{qt6_version} +Requires: cmake(Qt6Network) >= %{qt6_version} +Requires: cmake(Qt6Sql) >= %{qt6_version} +Requires: cmake(Qt6Keychain) +%endif +Requires: cmake(Olm) +Requires: pkgconfig(openssl) +# The devel packages are not coinstallable in the 0.8 release +%if 0%{?qt6} +Conflicts: libQuotient-devel +%endif + +%description -n libQuotient%{?pkg_suffix}-devel +The libQuotient devel package contains libraries and header files for +developing applications that use libQuotient. + +%prep +%autosetup -p1 -n %{rname}-%{version} + +%build +%if 0%{?qt6} +%cmake_qt6 \ + -DBUILD_SHARED_LIBS=ON \ +%endif + -DQuotient_INSTALL_TESTS=OFF + +%if 0%{?qt6} +%qt6_build +%endif + +%install +%if 0%{?qt6} +%qt6_install +%endif + +# Not useful +rm -r %{buildroot}%{_datadir}/ndk-modules/ + +%check +# testolmaccount needs a local server +%ctest --exclude-regex 'testolmaccount' + +%ldconfig_scriptlets -n libQuotient%{?qt6:%{lib_suffix}-}%{soversion} + +%files -n libQuotient%{?qt6:%{lib_suffix}-}%{soversion} +%doc README.md +%license COPYING +%{_libdir}/libQuotient%{?qt6:%{lib_suffix}}.so.%{version} +%{_libdir}/libQuotient%{?qt6:%{lib_suffix}}.so.%{sonum} + +%files -n libQuotient%{?pkg_suffix}-devel +%doc README.md +%license COPYING +%{_libdir}/pkgconfig/Quotient%{?qt6:%{lib_suffix}}.pc +%{_libdir}/libQuotient%{?qt6:%{lib_suffix}}.so +%{_libdir}/cmake/Quotient%{?qt6:%{lib_suffix}}/ +%{_includedir}/Quotient/ + +%changelog