Updated to version 0.4.0. Separated Qt 5 and Qt 6 versions into a different subpackages.

epel9
Vitaly Zaitsev 3 years ago
parent d31c312a81
commit b36f9b223f
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

1
.gitignore vendored

@ -1,2 +1,3 @@
/qcoro-0.2.0.tar.gz
/qcoro-0.3.0.tar.gz
/qcoro-0.4.0.tar.gz

@ -1,9 +1,20 @@
%undefine __cmake_in_source_build
%global appname QCoro
%global tests 1
%global appname QCoro
%global qt5_build_dir release-qt5
%global qt6_build_dir release-qt6
%global _description %{expand:
The QCoro library provides set of tools to make use of the C++20 coroutines
in connection with certain asynchronous Qt actions.
The major benefit of using coroutines with Qt types is that it allows writing
asynchronous code as if it were synchronous and, most importantly, while the
coroutine is co_awaiting, the Qt event loop runs as usual, meaning that your
application remains responsive.}
Name: qcoro
Version: 0.3.0
Version: 0.4.0
Release: 1%{?dist}
License: MIT
@ -14,6 +25,9 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake
BuildRequires: gcc-c++
@ -22,25 +36,51 @@ BuildRequires: ninja-build
%if 0%{?tests}
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5Test)
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Test)
BuildRequires: dbus-x11
%endif
%description
The QCoro library provides set of tools to make use of the C++20 coroutines
in connection with certain asynchronous Qt actions.
%description %_description
%package qt5
Summary: %{summary} 5
Provides: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: %{name} < %{?epoch:%{epoch}:}%{version}-%{release}
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%package qt6
Summary: %{summary} 6
%description devel
%{summary}.
%package qt5-devel
Summary: Development files for %{appname} (Qt 5 version)
Requires: %{name}-qt5%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: %{name}-devel < %{?epoch:%{epoch}:}%{version}-%{release}
%package qt6-devel
Summary: Development files for %{appname} (Qt 6 version)
Requires: %{name}-qt6%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description qt5 %_description
%description qt6 %_description
%description qt5-devel %_description
%description qt6-devel %_description
%prep
%autosetup -p1
sed -e '/-Werror/d' -i CMakeLists.txt
%build
# Creating directories for separate builds...
mkdir {%{qt5_build_dir},%{qt6_build_dir}}
# Building Qt 5 version...
pushd %{qt5_build_dir}
%cmake -G Ninja \
-S'..' \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_QT_VERSION:STRING=5 \
%if 0%{?tests}
@ -52,29 +92,78 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%endif
-DQCORO_ENABLE_ASAN:BOOL=OFF \
-DQCORO_WITH_QTDBUS:BOOL=ON \
-DQCORO_WITH_QTNETWORK:BOOL=ON \
-DQCORO_WITH_QTNETWORK:BOOL=ON
%cmake_build
popd
# Building Qt 6 version...
pushd %{qt6_build_dir}
%cmake -G Ninja \
-S'..' \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_QT_VERSION:STRING=6 \
%if 0%{?tests}
-DBUILD_TESTING:BOOL=ON \
-DQCORO_BUILD_EXAMPLES:BOOL=ON \
%else
-DBUILD_TESTING:BOOL=OFF \
-DQCORO_BUILD_EXAMPLES:BOOL=OFF \
%endif
-DQCORO_ENABLE_ASAN:BOOL=OFF \
-DQCORO_WITH_QTDBUS:BOOL=ON \
-DQCORO_WITH_QTNETWORK:BOOL=ON
%cmake_build
popd
%install
# Installing Qt 5 version...
pushd %{qt5_build_dir}
%cmake_install
popd
# Installing Qt 6 version...
pushd %{qt6_build_dir}
%cmake_install
popd
%if 0%{?tests}
%check
%ctest
# Performing tests against Qt 5 version...
pushd %{qt5_build_dir}
%ctest --timeout 3600 --exclude-regex '(qcoroprocess|qcoroabstractsocket|qcorolocalsocket)'
popd
# Performing tests against Qt 6 version...
pushd %{qt6_build_dir}
%ctest --timeout 3600 --exclude-regex '(qcoroprocess|qcoroabstractsocket|qcorolocalsocket)'
popd
%endif
%files
%files qt5
%doc README.md
%license LICENSES/*
%{_libdir}/lib%{appname}5*.so.0*
%files qt6
%doc README.md
%license LICENSES/*
%{_libdir}/lib%{appname}*.so.0*
%{_libdir}/lib%{appname}6*.so.0*
%files devel
%{_includedir}/%{appname}/
%{_includedir}/%{name}/
%{_libdir}/cmake/%{appname}/
%{_libdir}/lib%{appname}*.so
%files qt5-devel
%{_includedir}/%{name}5/
%{_libdir}/cmake/%{appname}5*/
%{_libdir}/lib%{appname}5*.so
%files qt6-devel
%{_includedir}/%{name}6/
%{_libdir}/cmake/%{appname}6*/
%{_libdir}/lib%{appname}6*.so
%changelog
* Sun Jan 09 2022 Vitaly Zaitsev <vitaly@easycoding.org> - 0.4.0-1
- Updated to version 0.4.0.
- Separated Qt 5 and Qt 6 versions into a different subpackages.
* Mon Oct 25 2021 Vitaly Zaitsev <vitaly@easycoding.org> - 0.3.0-1
- Updated to version 0.3.0.

@ -1 +1 @@
SHA512 (qcoro-0.3.0.tar.gz) = 16d8aa4ec0f6f45e5c7d716e18636a506524e44d6ed43612326911df2331f01a5b10f86a7b7d0ed307c1220b1b60aca3047143a5e6376f81ed9a081f7c922a38
SHA512 (qcoro-0.4.0.tar.gz) = bca0b0a02dabeabbf55fc1edc48d7d725ce8070a9f26317034f439958595d9a15c683d0bccaa4d1483d64d0a7737e84a0f7597bc3ad189b5a51f6b02d320cccf

Loading…
Cancel
Save