Add -tests subpackage with unit tests that can run in CI
Resolves: RHEL-28239
This commit is contained in:
parent
ea17c72fb3
commit
ac93f49075
@ -8,10 +8,13 @@
|
|||||||
%global prerelease rc2
|
%global prerelease rc2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global examples 1
|
||||||
|
%global build_tests 1
|
||||||
|
|
||||||
Summary: Qt6 - Qt 5 Compatibility Libraries
|
Summary: Qt6 - Qt 5 Compatibility Libraries
|
||||||
Name: qt6-%{qt_module}
|
Name: qt6-%{qt_module}
|
||||||
Version: 6.6.1
|
Version: 6.6.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
Url: http://www.qt.io
|
Url: http://www.qt.io
|
||||||
@ -58,20 +61,38 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%{summary}.
|
%{summary}.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%package tests
|
||||||
|
Summary: Unit tests for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description tests
|
||||||
|
%{summary}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
|
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_qt6 -DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF}
|
%cmake_qt6 \
|
||||||
|
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
|
||||||
|
-DQT_BUILD_TESTS=%{?build_tests:ON}%{!?build_tests:OFF}
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%qt6_dont_autoinstall_tests
|
||||||
|
%endif
|
||||||
|
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%qt6_install_tests
|
||||||
|
%endif
|
||||||
|
|
||||||
## .prl/.la file love
|
## .prl/.la file love
|
||||||
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
|
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
|
||||||
@ -112,7 +133,16 @@ popd
|
|||||||
%{_qt6_examplesdir}/
|
%{_qt6_examplesdir}/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?build_tests}
|
||||||
|
%files tests
|
||||||
|
%{_qt6_archdatadir}/tests
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 27 2024 Jan Grulich <jgrulich@redhat.com> - 6.6.1-5
|
||||||
|
- Add -tests subpackage with unit tests that can run in CI
|
||||||
|
Resolves: RHEL-28239
|
||||||
|
|
||||||
* Wed Jan 31 2024 Pete Walter <pwalter@fedoraproject.org> - 6.6.1-4
|
* Wed Jan 31 2024 Pete Walter <pwalter@fedoraproject.org> - 6.6.1-4
|
||||||
- Rebuild for ICU 74
|
- Rebuild for ICU 74
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user