Accepting request 918457 from home:matwey:branches:devel:libraries:c_c++
Initial version of influxdb-cxx library OBS-URL: https://build.opensuse.org/request/show/918457 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/influxdb-cxx?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
39
0001-Add-soversion-for-InfluxDB.patch
Normal file
39
0001-Add-soversion-for-InfluxDB.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 9a2ad88a7569cb7f4fe095d907fa001218ba07ff Mon Sep 17 00:00:00 2001
|
||||
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
|
||||
Date: Fri, 10 Sep 2021 18:05:09 +0000
|
||||
Subject: [PATCH] Add soversion for InfluxDB
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 106a33c..e393479 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -37,6 +37,22 @@ add_library(InfluxDB
|
||||
)
|
||||
add_library(InfluxData::InfluxDB ALIAS InfluxDB)
|
||||
|
||||
+#
|
||||
+# Here are a set of rules to help you update your library version information:
|
||||
+#
|
||||
+# If the library source code has changed at all since the last update,
|
||||
+# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
|
||||
+# If any interfaces have been added, removed, or changed since the last update,
|
||||
+# increment current, and set revision to 0.
|
||||
+# If any interfaces have been added since the last public release,
|
||||
+# then increment age.
|
||||
+# If any interfaces have been removed or changed since the last public release,
|
||||
+# then set age to 0.
|
||||
+#
|
||||
+# set_target_properties(InfluxDB PROPERTIES VERSION c.r.a SOVERSION c)
|
||||
+#
|
||||
+set_target_properties(InfluxDB PROPERTIES VERSION 0.0.0 SOVERSION 0)
|
||||
+
|
||||
generate_export_header(InfluxDB)
|
||||
|
||||
target_include_directories(InfluxDB
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 5b37509bb79ff164983cfd3991f49828136d613a Mon Sep 17 00:00:00 2001
|
||||
From: offa <bm-dev@yandex.com>
|
||||
Date: Thu, 5 Aug 2021 17:56:06 +0200
|
||||
Subject: [PATCH] Add trompeloeil::trompeloeil target if not available (#94).
|
||||
|
||||
---
|
||||
test/CMakeLists.txt | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index e9a3780..a9bdb13 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -2,6 +2,11 @@
|
||||
find_package(Catch2 REQUIRED)
|
||||
find_package(trompeloeil REQUIRED)
|
||||
|
||||
+if( NOT TARGET trompeloeil::trompeloeil )
|
||||
+ add_library(trompeloeil::trompeloeil INTERFACE IMPORTED)
|
||||
+ target_link_libraries(trompeloeil::trompeloeil INTERFACE trompeloeil)
|
||||
+endif()
|
||||
+
|
||||
|
||||
add_library(TestMain STATIC TestMain.cxx)
|
||||
target_link_libraries(TestMain PUBLIC Catch2::Catch2 trompeloeil::trompeloeil)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 7bed4d74a534049bc249b3df62627adbb593f8dc Mon Sep 17 00:00:00 2001
|
||||
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
|
||||
Date: Fri, 10 Sep 2021 17:29:09 +0000
|
||||
Subject: [PATCH] Allow setting CMAKE_INSTALL_LIBDIR from command line
|
||||
|
||||
Some distros really need lib64 at 64bit architectures. Make it possible to
|
||||
override the variable through cmake command line.
|
||||
---
|
||||
CMakeLists.txt | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 393973d..58e5100 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -55,9 +55,6 @@ include(GenerateExportHeader)
|
||||
# Set fPIC for all targets
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
-# Set CMAKE_INSTALL_LIBDIR explicitly to lib (to avoid lib64 on CC7)
|
||||
-set(CMAKE_INSTALL_LIBDIR lib)
|
||||
-
|
||||
# Set the default build type to "RelWithDebInfo"
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo"
|
||||
--
|
||||
2.31.1
|
||||
|
||||
3
influxdb-cxx-0.6.7.tar.gz
Normal file
3
influxdb-cxx-0.6.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fbd880b15e375a57b0009932d961d1e6608ecd9eaa98c2801ec4db5366dd093
|
||||
size 58254
|
||||
4
influxdb-cxx.changes
Normal file
4
influxdb-cxx.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 9 20:04:34 UTC 2021 - Matwey Kornilov <matwey.kornilov@gmail.com>
|
||||
|
||||
- Initial version
|
||||
103
influxdb-cxx.spec
Normal file
103
influxdb-cxx.spec
Normal file
@@ -0,0 +1,103 @@
|
||||
#
|
||||
# spec file for package influxdb-cxx
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define soname InfluxDB
|
||||
%define sover 0
|
||||
|
||||
Name: influxdb-cxx
|
||||
Version: 0.6.7
|
||||
Release: 0
|
||||
Summary: InfluxDB C++ client library
|
||||
License: MIT
|
||||
Group: Development/Languages/C and C++
|
||||
URL: https://github.com/offa/influxdb-cxx
|
||||
Source: https://github.com/offa/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-Add-trompeloeil-trompeloeil-target-if-not-available-.patch
|
||||
Patch1: 0001-Allow-setting-CMAKE_INSTALL_LIBDIR-from-command-line.patch
|
||||
Patch2: 0001-Add-soversion-for-InfluxDB.patch
|
||||
BuildRequires: Catch2-devel
|
||||
BuildRequires: cmake >= 3.12
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libboost_system-devel >= 1.57
|
||||
BuildRequires: cmake(trompeloeil)
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
InfluxDB C++ client library.
|
||||
|
||||
%package -n lib%{soname}%{sover}
|
||||
Summary: InfluxDB C++ client library
|
||||
Group: Development/Languages/C and C++
|
||||
|
||||
%description -n lib%{soname}%{sover}
|
||||
InfluxDB C++ client library.
|
||||
|
||||
%package devel
|
||||
Summary: InfluxDB C++ client library
|
||||
Group: Development/Languages/C and C++
|
||||
Requires: lib%{soname}%{sover} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
InfluxDB C++ client library.
|
||||
|
||||
This package contains development files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%cmake -DINFLUXCXX_SYSTEMTEST:BOOL=OFF
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
%ctest -- -E BoostSupportTest
|
||||
# BoostSupportTest requires running DNS resolver
|
||||
|
||||
%post -n lib%{soname}%{sover} -p /sbin/ldconfig
|
||||
%postun -n lib%{soname}%{sover} -p /sbin/ldconfig
|
||||
|
||||
%files -n lib%{soname}%{sover}
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE
|
||||
%{_libdir}/lib%{soname}.so.%{sover}*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE
|
||||
%doc README.md CONTRIBUTING.md
|
||||
%{_includedir}/InfluxDB.h
|
||||
%{_includedir}/InfluxDBException.h
|
||||
%{_includedir}/InfluxDBFactory.h
|
||||
%{_includedir}/Point.h
|
||||
%{_includedir}/Transport.h
|
||||
%{_includedir}/influxdb_export.h
|
||||
%{_libdir}/lib%{soname}.so
|
||||
%dir %{_libdir}/cmake/InfluxDB
|
||||
%{_libdir}/cmake/InfluxDB/InfluxDBConfig.cmake
|
||||
%{_libdir}/cmake/InfluxDB/InfluxDBConfigVersion.cmake
|
||||
%{_libdir}/cmake/InfluxDB/InfluxDBTargets-relwithdebinfo.cmake
|
||||
%{_libdir}/cmake/InfluxDB/InfluxDBTargets.cmake
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user