Add -tests subpackage with unit tests that can run in CI
Resolves: RHEL-28239
This commit is contained in:
parent
16bef9e46b
commit
34d2bfc876
@ -6,10 +6,13 @@
|
||||
%global prerelease rc2
|
||||
%endif
|
||||
|
||||
#global examples 1
|
||||
%global build_tests 1
|
||||
|
||||
Summary: Qt6 - QtImageFormats component
|
||||
Name: qt6-%{qt_module}
|
||||
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
|
||||
Url: http://www.qt.io
|
||||
@ -45,12 +48,22 @@ ref. Reading and Writing Image Files. The Qt Image Formats add-on module
|
||||
provides optional support for other image file formats, including:
|
||||
MNG, TGA, TIFF, WBMP.
|
||||
|
||||
%if 0%{?examples}
|
||||
%package examples
|
||||
Summary: Programming examples for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%description examples
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%package tests
|
||||
Summary: Unit tests for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description tests
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
|
||||
@ -59,7 +72,10 @@ rm -rv src/3rdparty
|
||||
|
||||
|
||||
%build
|
||||
%cmake_qt6 -DQT_FEATURE_mng=ON
|
||||
%cmake_qt6 \
|
||||
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
|
||||
-DQT_BUILD_TESTS=%{?build_tests:ON}%{!?build_tests:OFF} \
|
||||
-DQT_FEATURE_mng=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
@ -67,6 +83,10 @@ rm -rv src/3rdparty
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%qt6_install_tests
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSES/GPL*
|
||||
@ -81,8 +101,21 @@ rm -rv src/3rdparty
|
||||
%{_qt6_libdir}/cmake/Qt6/*.cmake
|
||||
%{_qt6_libdir}/cmake/Qt6Gui/*.cmake
|
||||
|
||||
%if 0%{?examples}
|
||||
%files examples
|
||||
%{_qt6_examplesdir}/
|
||||
%endif
|
||||
|
||||
%if 0%{?build_tests}
|
||||
%files tests
|
||||
%{_qt6_archdatadir}/tests
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user