Initial SPEC upload (#2009976).

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

1
.gitignore vendored

@ -0,0 +1 @@
/qcoro-0.2.0.tar.gz

@ -0,0 +1,60 @@
From f6aaf59f9b4bd116dbc24a6eaae426ac13067078 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Sat, 2 Oct 2021 17:10:02 +0200
Subject: [PATCH] Added SOVERSION field for shared libraries.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
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 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/QCoro>
)
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 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/QCoro>
)
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 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/QCoro>
)
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

@ -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 <vitaly@easycoding.org> - 0.2.0-1
- Initial SPEC release.

@ -0,0 +1 @@
SHA512 (qcoro-0.2.0.tar.gz) = 72ba6b3c5a7b0bd28f96e47dfdd6aeb5436acacfb7056d0941c2f705cfd8f611c59815b1a24777b8f755ed453fd7e7683b2d6936f210c86830b218e5b3d258b8
Loading…
Cancel
Save