From 70107bf1602bf658e33a5b06c3f1e739e5ef2dd5 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Sat, 2 Oct 2021 20:52:07 +0200 Subject: [PATCH] Initial SPEC upload (#2009976). --- .gitignore | 1 + qcoro-add-soversion.patch | 60 ++++++++++++++++++++++++++++ qcoro.spec | 82 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 144 insertions(+) create mode 100644 .gitignore create mode 100644 qcoro-add-soversion.patch create mode 100644 qcoro.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23b0a06 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/qcoro-0.2.0.tar.gz diff --git a/qcoro-add-soversion.patch b/qcoro-add-soversion.patch new file mode 100644 index 0000000..1423725 --- /dev/null +++ b/qcoro-add-soversion.patch @@ -0,0 +1,60 @@ +From f6aaf59f9b4bd116dbc24a6eaae426ac13067078 Mon Sep 17 00:00:00 2001 +From: Vitaly Zaitsev +Date: Sat, 2 Oct 2021 17:10:02 +0200 +Subject: [PATCH] Added SOVERSION field for shared libraries. + +Signed-off-by: Vitaly Zaitsev +--- + CMakeLists.txt | 1 + + qcoro/core/CMakeLists.txt | 1 + + qcoro/dbus/CMakeLists.txt | 1 + + qcoro/network/CMakeLists.txt | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0ad576e..937997c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,6 @@ + cmake_minimum_required(VERSION 3.19) + set(qcoro_VERSION 0.2.0) ++set(qcoro_SOVERSION 0) + project(qcoro LANGUAGES CXX VERSION ${qcoro_VERSION}) + + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +diff --git a/qcoro/core/CMakeLists.txt b/qcoro/core/CMakeLists.txt +index 125f9f0..02f8c06 100644 +--- a/qcoro/core/CMakeLists.txt ++++ b/qcoro/core/CMakeLists.txt +@@ -21,6 +21,7 @@ target_include_directories(QCoroCore + PUBLIC $ + ) + set_target_properties(QCoroCore PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) ++set_target_properties(QCoroCore PROPERTIES VERSION ${qcoro_VERSION} SOVERSION ${qcoro_SOVERSION}) + + generate_headers( + qcoro_core_CamelCase_HEADERS +diff --git a/qcoro/dbus/CMakeLists.txt b/qcoro/dbus/CMakeLists.txt +index b3af912..87f05a1 100644 +--- a/qcoro/dbus/CMakeLists.txt ++++ b/qcoro/dbus/CMakeLists.txt +@@ -21,6 +21,7 @@ target_include_directories(QCoroDBus + PUBLIC $ + ) + set_target_properties(QCoroDBus PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) ++set_target_properties(QCoroDBus PROPERTIES VERSION ${qcoro_VERSION} SOVERSION ${qcoro_SOVERSION}) + + generate_headers( + qcoro_dbus_CamelCase_HEADERS +diff --git a/qcoro/network/CMakeLists.txt b/qcoro/network/CMakeLists.txt +index 28c27a7..3c3b35c 100644 +--- a/qcoro/network/CMakeLists.txt ++++ b/qcoro/network/CMakeLists.txt +@@ -22,6 +22,7 @@ target_include_directories(QCoroNetwork + PUBLIC $ + ) + set_target_properties(QCoroNetwork PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) ++set_target_properties(QCoroNetwork PROPERTIES VERSION ${qcoro_VERSION} SOVERSION ${qcoro_SOVERSION}) + + generate_headers( + qcoro_network_CamelCase_HEADERS diff --git a/qcoro.spec b/qcoro.spec new file mode 100644 index 0000000..bed450d --- /dev/null +++ b/qcoro.spec @@ -0,0 +1,82 @@ +%undefine __cmake_in_source_build +%global appname QCoro +%global tests 1 + +Name: qcoro +Version: 0.2.0 +Release: 1%{?dist} + +License: MIT +Summary: C++ Coroutines for Qt +URL: https://github.com/danvratil/%{name} +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5DBus) +BuildRequires: cmake(Qt5Widgets) + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: ninja-build + +%if 0%{?tests} +BuildRequires: cmake(Qt5Concurrent) +BuildRequires: cmake(Qt5Test) +BuildRequires: dbus-x11 +%endif + +# https://github.com/danvratil/qcoro/pull/17 +Patch100: %{name}-add-soversion.patch + +%description +The QCoro library provides set of tools to make use of the C++20 coroutines +in connection with certain asynchronous Qt actions. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description devel +%{summary}. + +%prep +%autosetup -p1 + +%build +%cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_QT_VERSION:STRING=5 \ +%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 + +%install +%cmake_install + +%if 0%{?tests} +%check +%ctest +%endif + +%files +%doc README.md +%license LICENSES/* +%{_libdir}/lib%{appname}*.so.0* + +%files devel +%{_includedir}/%{appname}/ +%{_includedir}/%{name}/ +%{_libdir}/cmake/%{appname}/ +%{_libdir}/lib%{appname}*.so + +%changelog +* Sat Oct 02 2021 Vitaly Zaitsev - 0.2.0-1 +- Initial SPEC release. diff --git a/sources b/sources new file mode 100644 index 0000000..a3aadc6 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (qcoro-0.2.0.tar.gz) = 72ba6b3c5a7b0bd28f96e47dfdd6aeb5436acacfb7056d0941c2f705cfd8f611c59815b1a24777b8f755ed453fd7e7683b2d6936f210c86830b218e5b3d258b8