Accepting request 1151219 from network
- Add build flavors to have both Qt5 and Qt6 variants available. The KDE CI and future packages require a qt6-based libqxmpp - Enable the onemo build dependency on Leap 15.5/15.6 - Switch to the latest GCC version available in Leap for packages that can't build with the default compiler OBS-URL: https://build.opensuse.org/request/show/1151219 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqxmpp?expand=0&rev=22
This commit is contained in:
commit
12fc2e7a74
5
_multibuild
Normal file
5
_multibuild
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<multibuild>
|
||||||
|
<flavor>qt5</flavor>
|
||||||
|
<flavor>qt6</flavor>
|
||||||
|
</multibuild>
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 8 10:22:03 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Add build flavors to have both Qt5 and Qt6 variants available.
|
||||||
|
The KDE CI and future packages require a qt6-based libqxmpp
|
||||||
|
- Enable the onemo build dependency on Leap 15.5/15.6
|
||||||
|
- Switch to the latest GCC version available in Leap for packages
|
||||||
|
that can't build with the default compiler
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 7 05:49:14 UTC 2024 - Michael Vetter <mvetter@suse.com>
|
Wed Feb 7 05:49:14 UTC 2024 - Michael Vetter <mvetter@suse.com>
|
||||||
|
|
||||||
|
130
libqxmpp.spec
130
libqxmpp.spec
@ -16,92 +16,138 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Currently not available on 15.4 / 15.5
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if 0%{?suse_version} > 1500
|
%if "%{flavor}" == ""
|
||||||
%bcond_without omemo
|
ExclusiveArch: do_not_build
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "qt5"
|
||||||
|
%define qt5 1
|
||||||
|
%define pkg_suffix -qt5
|
||||||
|
%define lib_suffix Qt5
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "qt6"
|
||||||
|
%define qt6 1
|
||||||
|
%define pkg_suffix -qt6
|
||||||
|
%define lib_suffix Qt6
|
||||||
%endif
|
%endif
|
||||||
%define sover 4
|
%define sover 4
|
||||||
Name: libqxmpp
|
Name: libqxmpp%{?pkg_suffix}
|
||||||
Version: 1.6.0
|
Version: 1.6.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Qt XMPP Library
|
Summary: Qt XMPP Library
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
URL: https://github.com/qxmpp-project/qxmpp/
|
URL: https://github.com/qxmpp-project/qxmpp/
|
||||||
Source0: https://github.com/qxmpp-project/qxmpp/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/qxmpp-project/qxmpp/archive/v%{version}.tar.gz#/libqxmpp-%{version}.tar.gz
|
||||||
BuildRequires: cmake >= 3.7
|
BuildRequires: cmake
|
||||||
|
%if 0%{?qt5}
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
%endif
|
||||||
# c++-17 is required
|
# c++-17 is required
|
||||||
%if 0%{?suse_version} == 1500
|
%if 0%{?suse_version} < 1550
|
||||||
BuildRequires: gcc10-c++
|
BuildRequires: gcc13-c++
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
%if 0%{?qt5}
|
||||||
BuildRequires: cmake(Qca-qt5)
|
BuildRequires: cmake(Qca-qt5)
|
||||||
BuildRequires: cmake(Qt5Core) >= 5.15.0
|
BuildRequires: cmake(Qt5Core) >= 5.15.0
|
||||||
BuildRequires: cmake(Qt5Gui)
|
BuildRequires: cmake(Qt5Gui)
|
||||||
BuildRequires: cmake(Qt5Network)
|
BuildRequires: cmake(Qt5Network)
|
||||||
BuildRequires: cmake(Qt5Test)
|
BuildRequires: cmake(Qt5Test)
|
||||||
BuildRequires: cmake(Qt5Xml)
|
BuildRequires: cmake(Qt5Xml)
|
||||||
BuildRequires: pkgconfig(gstreamer-1.0)
|
%else
|
||||||
%if %{with omemo}
|
BuildRequires: cmake(Qca-qt6)
|
||||||
BuildRequires: pkgconfig(libomemo-c)
|
BuildRequires: cmake(Qt6Core)
|
||||||
|
BuildRequires: cmake(Qt6Core5Compat)
|
||||||
|
BuildRequires: cmake(Qt6Gui)
|
||||||
|
BuildRequires: cmake(Qt6Network)
|
||||||
|
BuildRequires: cmake(Qt6Test)
|
||||||
|
BuildRequires: cmake(Qt6Xml)
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||||
|
BuildRequires: pkgconfig(libomemo-c)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
QXmpp is a cross-platform C++ XMPP client library based on Qt and C++.
|
QXmpp is a cross-platform C++ XMPP client library based on Qt and C++.
|
||||||
|
|
||||||
%package -n %{name}%{sover}
|
%package -n libQXmpp%{lib_suffix}-%{sover}
|
||||||
Summary: Qt XMPP Library
|
Summary: Qt XMPP Library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Provides: libqxmpp-qt5-0 = %{version}
|
Provides: libqxmpp-qt5-0 = %{version}
|
||||||
Obsoletes: libqxmpp-qt5-0 < %{version}
|
Obsoletes: libqxmpp-qt5-0 < %{version}
|
||||||
|
# Renamed in the 1.5.4 release
|
||||||
|
%if 0%{?qt5}
|
||||||
|
Provides: libqxmpp4 = %{version}
|
||||||
|
Obsoletes: libqxmpp4 < %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description -n %{name}%{sover}
|
%description -n libQXmpp%{lib_suffix}-%{sover}
|
||||||
QXmpp is a cross-platform C++ XMPP client library based on Qt and C++.
|
QXmpp is a cross-platform C++ XMPP client library based on Qt and C++.
|
||||||
|
|
||||||
%package -n %{name}-devel
|
%package -n libQXmpp%{lib_suffix}-devel
|
||||||
Summary: Qxmpp Development Files
|
Summary: Qxmpp Development Files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name}%{sover} = %{version}
|
Requires: libQXmpp%{lib_suffix}-%{sover} = %{version}
|
||||||
|
Requires: libqxmpp-devel = %{version}
|
||||||
Requires: pkgconfig(gstreamer-1.0)
|
Requires: pkgconfig(gstreamer-1.0)
|
||||||
|
%if 0%{?qt5}
|
||||||
Provides: libqxmpp-qt5-devel = %{version}
|
Provides: libqxmpp-qt5-devel = %{version}
|
||||||
Obsoletes: libqxmpp-qt5-devel < %{version}
|
Obsoletes: libqxmpp-qt5-devel < %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description -n %{name}-devel
|
%description -n libQXmpp%{lib_suffix}-devel
|
||||||
Development package for qxmpp.
|
Development package for qxmpp.
|
||||||
|
|
||||||
%package doc
|
%if 0%{?qt5}
|
||||||
|
# Backward compatibility module, it can be used for both Qt5 and Qt6 variants
|
||||||
|
%package -n libqxmpp-devel
|
||||||
|
Summary: Compatibility helper for libqxmpp
|
||||||
|
Requires: (libQXmppQt5-devel = %{version} if libQt5Core-devel)
|
||||||
|
Requires: (libQXmppQt6-devel = %{version} if qt6-core-devel)
|
||||||
|
|
||||||
|
%description -n libqxmpp-devel
|
||||||
|
This package provides a backward compatibility helper for CMake users.
|
||||||
|
If 'QT_VERSION_MAJOR' is not set in the dependent package, the CMake module
|
||||||
|
will try to determine the needed QXmpp variant based on which Qt version was
|
||||||
|
already found by CMake.
|
||||||
|
|
||||||
|
# No need to build it twice
|
||||||
|
%package -n libqxmpp-doc
|
||||||
Summary: Qxmpp library documentation
|
Summary: Qxmpp library documentation
|
||||||
Group: Documentation/HTML
|
Group: Documentation/HTML
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description -n libqxmpp-doc
|
||||||
This packages provides documentation of Qxmpp library API.
|
This packages provides documentation of Qxmpp library API.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n qxmpp-%{version}
|
%autosetup -p1 -n qxmpp-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version} <= 1500
|
%if 0%{?suse_version} < 1550
|
||||||
export CXX=g++-10
|
export CXX=g++-13
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Due to the cmake maintainers bad idea, CMAKE_INSTALL_DOCDIR has to be redefined
|
||||||
%cmake \
|
%cmake \
|
||||||
-DWITH_GSTREAMER=ON \
|
-DWITH_GSTREAMER=ON \
|
||||||
|
%if 0%{?qt5}
|
||||||
|
-DCMAKE_INSTALL_DOCDIR=%{_datadir}/doc/qxmpp \
|
||||||
-DBUILD_DOCUMENTATION=ON \
|
-DBUILD_DOCUMENTATION=ON \
|
||||||
-DBUILD_EXAMPLES=ON \
|
|
||||||
-DBUILD_TESTS=ON \
|
|
||||||
%if %{with omemo}
|
|
||||||
-DBUILD_OMEMO=ON \
|
|
||||||
%endif
|
%endif
|
||||||
|
-DBUILD_TESTS=ON \
|
||||||
|
-DBUILD_OMEMO=ON
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
|
%if 0%{?qt5}
|
||||||
%fdupes %{buildroot}%{_datadir}/doc/qxmpp/
|
%fdupes %{buildroot}%{_datadir}/doc/qxmpp/
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||||
@ -109,29 +155,31 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
|||||||
# Exclude tests needing a network connection
|
# Exclude tests needing a network connection
|
||||||
%{ctest --exclude-regex "tst_(qxmppcallmanager|qxmppiceconnection|qxmppserver|qxmpptransfermanager|qxmppuploadrequestmanager)"}
|
%{ctest --exclude-regex "tst_(qxmppcallmanager|qxmppiceconnection|qxmppserver|qxmpptransfermanager|qxmppuploadrequestmanager)"}
|
||||||
|
|
||||||
%ldconfig_scriptlets -n %{name}%{sover}
|
%ldconfig_scriptlets -n libQXmpp%{lib_suffix}-%{sover}
|
||||||
|
|
||||||
%files -n %{name}%{sover}
|
%files -n libQXmpp%{lib_suffix}-%{sover}
|
||||||
%license LICENSES/*
|
%license LICENSES/*
|
||||||
%doc AUTHORS CHANGELOG.md README.md
|
%doc AUTHORS CHANGELOG.md README.md
|
||||||
%{_libdir}/libQXmppQt5.so.*
|
%{_libdir}/libQXmpp%{lib_suffix}.so.*
|
||||||
%if %{with omemo}
|
%{_libdir}/libQXmppOmemo%{lib_suffix}.so.*
|
||||||
%{_libdir}/libQXmppOmemoQt5.so.*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n %{name}-devel
|
%files -n libQXmpp%{lib_suffix}-devel
|
||||||
%{_includedir}/QXmppQt5/
|
%{_includedir}/QXmpp%{lib_suffix}/
|
||||||
%{_libdir}/libQXmppQt5.so
|
%{_libdir}/libQXmpp%{lib_suffix}.so
|
||||||
%{_libdir}/cmake/QXmpp/
|
%{_libdir}/libQXmppOmemo%{lib_suffix}.so
|
||||||
%{_libdir}/cmake/QXmppQt5/
|
%{_libdir}/cmake/QXmpp%{lib_suffix}/
|
||||||
|
%{_libdir}/cmake/QXmppOmemo%{lib_suffix}/
|
||||||
|
%{_libdir}/pkgconfig/QXmpp%{lib_suffix}.pc
|
||||||
|
%if 0%{?qt5}
|
||||||
%{_libdir}/pkgconfig/qxmpp.pc
|
%{_libdir}/pkgconfig/qxmpp.pc
|
||||||
%{_libdir}/pkgconfig/QXmppQt5.pc
|
|
||||||
%if %{with omemo}
|
|
||||||
%{_libdir}/libQXmppOmemoQt5.so
|
|
||||||
%{_libdir}/cmake/QXmppOmemoQt5/
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files doc
|
%if 0%{?qt5}
|
||||||
|
%files -n libqxmpp-devel
|
||||||
|
%{_libdir}/cmake/QXmpp/
|
||||||
|
|
||||||
|
%files -n libqxmpp-doc
|
||||||
%{_datadir}/doc/qxmpp/
|
%{_datadir}/doc/qxmpp/
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user