|
|
@ -1,9 +1,20 @@
|
|
|
|
%undefine __cmake_in_source_build
|
|
|
|
%undefine __cmake_in_source_build
|
|
|
|
%global appname QCoro
|
|
|
|
|
|
|
|
%global tests 1
|
|
|
|
%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
|
|
|
|
Name: qcoro
|
|
|
|
Version: 0.3.0
|
|
|
|
Version: 0.4.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
License: MIT
|
|
|
@ -14,6 +25,9 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
BuildRequires: cmake(Qt5Core)
|
|
|
|
BuildRequires: cmake(Qt5Core)
|
|
|
|
BuildRequires: cmake(Qt5DBus)
|
|
|
|
BuildRequires: cmake(Qt5DBus)
|
|
|
|
BuildRequires: cmake(Qt5Widgets)
|
|
|
|
BuildRequires: cmake(Qt5Widgets)
|
|
|
|
|
|
|
|
BuildRequires: cmake(Qt6Core)
|
|
|
|
|
|
|
|
BuildRequires: cmake(Qt6DBus)
|
|
|
|
|
|
|
|
BuildRequires: cmake(Qt6Widgets)
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gcc-c++
|
|
|
@ -22,25 +36,51 @@ BuildRequires: ninja-build
|
|
|
|
%if 0%{?tests}
|
|
|
|
%if 0%{?tests}
|
|
|
|
BuildRequires: cmake(Qt5Concurrent)
|
|
|
|
BuildRequires: cmake(Qt5Concurrent)
|
|
|
|
BuildRequires: cmake(Qt5Test)
|
|
|
|
BuildRequires: cmake(Qt5Test)
|
|
|
|
|
|
|
|
BuildRequires: cmake(Qt6Concurrent)
|
|
|
|
|
|
|
|
BuildRequires: cmake(Qt6Test)
|
|
|
|
BuildRequires: dbus-x11
|
|
|
|
BuildRequires: dbus-x11
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description %_description
|
|
|
|
The QCoro library provides set of tools to make use of the C++20 coroutines
|
|
|
|
|
|
|
|
in connection with certain asynchronous Qt actions.
|
|
|
|
%package qt5
|
|
|
|
|
|
|
|
Summary: %{summary} 5
|
|
|
|
|
|
|
|
Provides: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
Obsoletes: %{name} < %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
%package qt6
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Summary: %{summary} 6
|
|
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
%package qt5-devel
|
|
|
|
%{summary}.
|
|
|
|
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
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
sed -e '/-Werror/d' -i CMakeLists.txt
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
|
|
|
|
# Creating directories for separate builds...
|
|
|
|
|
|
|
|
mkdir {%{qt5_build_dir},%{qt6_build_dir}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Building Qt 5 version...
|
|
|
|
|
|
|
|
pushd %{qt5_build_dir}
|
|
|
|
%cmake -G Ninja \
|
|
|
|
%cmake -G Ninja \
|
|
|
|
|
|
|
|
-S'..' \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DUSE_QT_VERSION:STRING=5 \
|
|
|
|
-DUSE_QT_VERSION:STRING=5 \
|
|
|
|
%if 0%{?tests}
|
|
|
|
%if 0%{?tests}
|
|
|
@ -52,29 +92,78 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
-DQCORO_ENABLE_ASAN:BOOL=OFF \
|
|
|
|
-DQCORO_ENABLE_ASAN:BOOL=OFF \
|
|
|
|
-DQCORO_WITH_QTDBUS:BOOL=ON \
|
|
|
|
-DQCORO_WITH_QTDBUS:BOOL=ON \
|
|
|
|
-DQCORO_WITH_QTNETWORK:BOOL=ON \
|
|
|
|
-DQCORO_WITH_QTNETWORK:BOOL=ON
|
|
|
|
%cmake_build
|
|
|
|
%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
|
|
|
|
%install
|
|
|
|
|
|
|
|
# Installing Qt 5 version...
|
|
|
|
|
|
|
|
pushd %{qt5_build_dir}
|
|
|
|
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installing Qt 6 version...
|
|
|
|
|
|
|
|
pushd %{qt6_build_dir}
|
|
|
|
%cmake_install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?tests}
|
|
|
|
%if 0%{?tests}
|
|
|
|
%check
|
|
|
|
%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
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files qt5
|
|
|
|
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
%license LICENSES/*
|
|
|
|
|
|
|
|
%{_libdir}/lib%{appname}5*.so.0*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files qt6
|
|
|
|
%doc README.md
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSES/*
|
|
|
|
%license LICENSES/*
|
|
|
|
%{_libdir}/lib%{appname}*.so.0*
|
|
|
|
%{_libdir}/lib%{appname}6*.so.0*
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%files qt5-devel
|
|
|
|
%{_includedir}/%{appname}/
|
|
|
|
%{_includedir}/%{name}5/
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_libdir}/cmake/%{appname}5*/
|
|
|
|
%{_libdir}/cmake/%{appname}/
|
|
|
|
%{_libdir}/lib%{appname}5*.so
|
|
|
|
%{_libdir}/lib%{appname}*.so
|
|
|
|
|
|
|
|
|
|
|
|
%files qt6-devel
|
|
|
|
|
|
|
|
%{_includedir}/%{name}6/
|
|
|
|
|
|
|
|
%{_libdir}/cmake/%{appname}6*/
|
|
|
|
|
|
|
|
%{_libdir}/lib%{appname}6*.so
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%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
|
|
|
|
* Mon Oct 25 2021 Vitaly Zaitsev <vitaly@easycoding.org> - 0.3.0-1
|
|
|
|
- Updated to version 0.3.0.
|
|
|
|
- Updated to version 0.3.0.
|
|
|
|
|
|
|
|
|
|
|
|