From 83d6a9ce3ff278038f1db92367a134bb5ecbcd18da4f594a55eaadf154abb474 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 16 Jan 2019 00:11:36 +0000 Subject: [PATCH] Accepting request 664614 from home:mrostecki - Initial release 0.8.1: * Support setting up gRPC via cmake. * Improve performance of span context propagation. * Add benchmarks for multikey propagation performance. - Add lightstep-tracer-cpp-cmake-add-soversion.patch - required to build libraries with soversion - Add lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch - required to install libraries in custom libdir OBS-URL: https://build.opensuse.org/request/show/664614 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/lightstep-tracer-cpp?expand=0&rev=1 --- .gitattributes | 23 +++++ .gitignore | 1 + _service | 16 ++++ _servicedata | 4 + lightstep-tracer-cpp-0.8.1.tar.xz | 3 + ...tstep-tracer-cpp-cmake-add-soversion.patch | 27 ++++++ ...-tracer-cpp-cmake-use-gnuinstalldirs.patch | 76 +++++++++++++++++ lightstep-tracer-cpp.changes | 11 +++ lightstep-tracer-cpp.spec | 83 +++++++++++++++++++ 9 files changed, 244 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 _servicedata create mode 100644 lightstep-tracer-cpp-0.8.1.tar.xz create mode 100644 lightstep-tracer-cpp-cmake-add-soversion.patch create mode 100644 lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch create mode 100644 lightstep-tracer-cpp.changes create mode 100644 lightstep-tracer-cpp.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..0cf8869 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + https://github.com/lightstep/lightstep-tracer-cpp.git + git + enable + lightstep-tracer-cpp + @PARENT_TAG@ + v(.*) + refs/tags/v0.8.1 + + + *.tar + xz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..4342214 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/lightstep/lightstep-tracer-cpp.git + 798dbca30c70f454d53ad55af5a18d7cf312ee3f \ No newline at end of file diff --git a/lightstep-tracer-cpp-0.8.1.tar.xz b/lightstep-tracer-cpp-0.8.1.tar.xz new file mode 100644 index 0000000..cc93f61 --- /dev/null +++ b/lightstep-tracer-cpp-0.8.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f080a67679d076af3271413f4bfb00be923e5c632698789519a5cb9b1f4ff027 +size 123176 diff --git a/lightstep-tracer-cpp-cmake-add-soversion.patch b/lightstep-tracer-cpp-cmake-add-soversion.patch new file mode 100644 index 0000000..fd7949f --- /dev/null +++ b/lightstep-tracer-cpp-cmake-add-soversion.patch @@ -0,0 +1,27 @@ +From 73e22db28728a2979ec90e18606f162d676a29aa Mon Sep 17 00:00:00 2001 +From: Michal Rostecki +Date: Tue, 11 Dec 2018 18:22:11 +0100 +Subject: [PATCH 1/2] cmake: Add SOVERSION property to the library + +SOVERSION property creates `so.0` files, not only `.so`. + +Signed-off-by: Michal Rostecki +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc3639f..29b427e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,6 +204,7 @@ if (BUILD_SHARED_LIBS) + _apply_clang_tidy_if_available(lightstep_tracer) + endif() + target_link_libraries(lightstep_tracer ${LIGHTSTEP_LINK_LIBRARIES}) ++ set_target_properties(lightstep_tracer PROPERTIES SOVERSION ${LIGHTSTEP_VERSION_MAJOR}) + install(TARGETS lightstep_tracer + LIBRARY DESTINATION lib) + endif() +-- +2.19.2 + diff --git a/lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch b/lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch new file mode 100644 index 0000000..2814661 --- /dev/null +++ b/lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch @@ -0,0 +1,76 @@ +From 2e9a2e1d71bf10312d03470b56006a03ca2b06f7 Mon Sep 17 00:00:00 2001 +From: Michal Rostecki +Date: Tue, 11 Dec 2018 18:25:16 +0100 +Subject: [PATCH 2/2] cmake: Use GNUInstallDirs for libdir and includedir + +The comon practice in cmake to allow to specify the libdir or +includedir using GNUInstallDirs which introduces the following +options: + +* CMAKE_INSTALL_INCLUDEDIR +* CMAKE_INSTALL_LIBDIR + +The main motivation behind this change is ability to use /usr/lib64 +instead of /usr/lib as a libdir. + +Signed-off-by: Michal Rostecki +--- + CMakeLists.txt | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 29b427e..4b51430 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,6 +28,12 @@ include(CPack) + # ============================================================================== + # Set up options + ++# Introduce variables: ++# * CMAKE_INSTALL_LIBDIR ++# * CMAKE_INSTALL_BINDIR ++# * CMAKE_INSTALL_INCLUDEDIR ++include(GNUInstallDirs) ++ + option(WITH_GRPC "Build with support for gRPC." ON) + option(WITH_DYNAMIC_LOAD "Build support for dynamic loading." ON) + option(ENABLE_LINTING "Run clang-tidy on sources if available." OFF) +@@ -67,7 +73,7 @@ configure_file(version.h.in include/lightstep/version.h) + configure_file(config.h.in include/lightstep/config.h) + include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/lightstep +- DESTINATION include) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + if(HEADERS_ONLY) + return() +@@ -152,7 +158,7 @@ add_subdirectory(3rd_party) + include_directories(SYSTEM ${LIGHTSTEP_THIRD_PARTY_INCLUDES}) + + include_directories(include) +-install(DIRECTORY include/lightstep DESTINATION include) ++install(DIRECTORY include/lightstep DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) + include(LightStepTracerCommon) +@@ -206,7 +212,7 @@ if (BUILD_SHARED_LIBS) + target_link_libraries(lightstep_tracer ${LIGHTSTEP_LINK_LIBRARIES}) + set_target_properties(lightstep_tracer PROPERTIES SOVERSION ${LIGHTSTEP_VERSION_MAJOR}) + install(TARGETS lightstep_tracer +- LIBRARY DESTINATION lib) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if (BUILD_STATIC_LIBS) +@@ -222,7 +228,7 @@ if (BUILD_STATIC_LIBS) + endif() + target_link_libraries(lightstep_tracer-static ${LIGHTSTEP_LINK_LIBRARIES}) + install(TARGETS lightstep_tracer-static +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + +-- +2.19.2 + diff --git a/lightstep-tracer-cpp.changes b/lightstep-tracer-cpp.changes new file mode 100644 index 0000000..5ace035 --- /dev/null +++ b/lightstep-tracer-cpp.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Tue Dec 11 16:47:04 UTC 2018 - MichaƂ Rostecki + +- Initial release 0.8.1: + * Support setting up gRPC via cmake. + * Improve performance of span context propagation. + * Add benchmarks for multikey propagation performance. +- Add lightstep-tracer-cpp-cmake-add-soversion.patch - required to + build libraries with soversion +- Add lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch - + required to install libraries in custom libdir diff --git a/lightstep-tracer-cpp.spec b/lightstep-tracer-cpp.spec new file mode 100644 index 0000000..89f7a50 --- /dev/null +++ b/lightstep-tracer-cpp.spec @@ -0,0 +1,83 @@ +# +# spec file for package lightstep-tracer-cpp +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + + +%define sover 0 +%define libname liblightstep_tracer%{sover} + +Name: lightstep-tracer-cpp +Version: 0.8.1 +Release: 0 +Summary: C++ library for LightStep distributed tracing +License: MIT +Group: Development/Languages/C and C++ +Url: http://lightstep.com/ +Source: %{name}-%{version}.tar.xz +Patch0: lightstep-tracer-cpp-cmake-add-soversion.patch +Patch1: lightstep-tracer-cpp-cmake-use-gnuinstalldirs.patch +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: grpc-devel +BuildRequires: opentracing-cpp-devel +BuildRequires: protobuf-devel + +%description +C++ library for the LightStep distributed tracing. + +%package -n %{libname} +Summary: C++ library for LightStep distributed tracing +Group: System/Libraries + +%description -n %{libname} +Shared library for lightstep-tracer-cpp - C++ library for LightStep +distributed tracing. + +%package devel +Summary: Development files for the LightStep C++ library +Group: Development/Languages/C and C++ +Requires: %{libname} = %{version} + +%description devel +Development files for lightstep-tracer-cpp - C++ library for LightStep +distributed tracing. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%cmake +%make_jobs + +%install +%cmake_install + +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig + +%files -n %{libname} +%license LICENSE +%doc README.md +%{_libdir}/liblightstep_tracer.so.0 + +%files devel +%{_includedir}/lightstep +%{_libdir}/liblightstep_tracer.so + +%changelog +