Init package
This commit is contained in:
parent
2a68d03375
commit
62398433ea
BIN
5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b.tar.gz
Normal file
BIN
5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b.tar.gz
Normal file
Binary file not shown.
74
backport-define-a-local-repository-for-OpenSSL.patch
Normal file
74
backport-define-a-local-repository-for-OpenSSL.patch
Normal file
@ -0,0 +1,74 @@
|
||||
From eb14c2767bc7db6ea3de28669680a4bca54fe383 Mon Sep 17 00:00:00 2001
|
||||
From: Michał Rostecki <mrostecki@suse.de>
|
||||
Date: Tue, 8 Apr 2025 09:30:14 +0800
|
||||
Subject: [PATCH] define a local repository for OpenSSL
|
||||
|
||||
Reference: https://build.opensuse.org/projects/openSUSE:Factory/packages/opencensus-cpp/files/opencensus-cpp.spec?expand=1
|
||||
---
|
||||
WORKSPACE | 22 +++++++++++++++++++++
|
||||
opencensus/exporters/stats/prometheus/BUILD | 6 +++---
|
||||
2 files changed, 25 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/WORKSPACE b/WORKSPACE
|
||||
index 1a4948f..89b5ac7 100644
|
||||
--- a/WORKSPACE
|
||||
+++ b/WORKSPACE
|
||||
@@ -47,3 +47,25 @@ grpc_extra_deps()
|
||||
load("@com_github_jupp0r_prometheus_cpp//bazel:repositories.bzl", "prometheus_cpp_repositories")
|
||||
|
||||
prometheus_cpp_repositories()
|
||||
+OPENSSL_BUILD_CONTENT = """
|
||||
+cc_library(
|
||||
+ name = "openssl-lib",
|
||||
+ hdrs = glob([
|
||||
+ "thirdparty_build/include/openssl",
|
||||
+ "thirdparty_build/include/ssl",
|
||||
+ ]),
|
||||
+ copts = [
|
||||
+ "-I/usr/include/openssl",
|
||||
+ "-I/usr/include/ssl",
|
||||
+ ],
|
||||
+ linkopts = ["-lssl", "-lcrypto"],
|
||||
+ visibility = ["//visibility:public"],
|
||||
+ linkstatic = False,
|
||||
+)
|
||||
+"""
|
||||
+
|
||||
+new_local_repository(
|
||||
+ name = "openssl",
|
||||
+ path = "%{_libdir}",
|
||||
+ build_file_content = OPENSSL_BUILD_CONTENT,
|
||||
+)
|
||||
diff --git a/opencensus/exporters/stats/prometheus/BUILD b/opencensus/exporters/stats/prometheus/BUILD
|
||||
index 302724d..748c7e3 100644
|
||||
--- a/opencensus/exporters/stats/prometheus/BUILD
|
||||
+++ b/opencensus/exporters/stats/prometheus/BUILD
|
||||
@@ -27,7 +27,7 @@ cc_library(
|
||||
deps = [
|
||||
":prometheus_utils",
|
||||
"//opencensus/stats",
|
||||
- "@com_github_jupp0r_prometheus_cpp//core",
|
||||
+ "@com_github_jupp0r_prometheus_cpp//:core",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -41,7 +41,7 @@ cc_library(
|
||||
copts = DEFAULT_COPTS,
|
||||
deps = [
|
||||
"//opencensus/stats",
|
||||
- "@com_github_jupp0r_prometheus_cpp//core",
|
||||
+ "@com_github_jupp0r_prometheus_cpp//:core",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/time",
|
||||
],
|
||||
@@ -69,7 +69,7 @@ cc_binary(
|
||||
deps = [
|
||||
":prometheus_exporter",
|
||||
"//opencensus/stats",
|
||||
- "@com_github_jupp0r_prometheus_cpp//pull",
|
||||
+ "@com_github_jupp0r_prometheus_cpp//:pull",
|
||||
"@com_google_absl//absl/time",
|
||||
],
|
||||
)
|
||||
--
|
||||
2.33.0
|
||||
47
opencensus-cpp.spec
Normal file
47
opencensus-cpp.spec
Normal file
@ -0,0 +1,47 @@
|
||||
%global debug_package %{nil}
|
||||
%define src_install_dir /usr/src/%{name}
|
||||
%define version_unconverted 5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b
|
||||
|
||||
Name: opencensus-cpp
|
||||
Version: %{version_unconverted}
|
||||
Release: 1
|
||||
Summary: A stats collection and distributed tracing framework
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/census-instrumentation/opencensus-cpp
|
||||
Source: https://github.com/census-instrumentation/opencensus-cpp/archive/%{version_unconverted}.tar.gz
|
||||
BuildRequires: fdupes
|
||||
|
||||
Patch0: backport-define-a-local-repository-for-OpenSSL.patch
|
||||
|
||||
%description
|
||||
OpenCensus is a toolkit for collecting application performance and behavior
|
||||
data. It currently includes an API for tracing and stats.
|
||||
|
||||
%package source
|
||||
Summary: Source code of opencensus-cpp
|
||||
BuildArch: noarch
|
||||
|
||||
%description source
|
||||
OpenCensus is a toolkit for collecting application performance and behavior
|
||||
data. It currently includes an API for tracing and stats.
|
||||
|
||||
This package provides source code of opencensus-cpp.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{version_unconverted}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{src_install_dir}
|
||||
cp -r * %{buildroot}%{src_install_dir}
|
||||
%fdupes %{buildroot}%{src_install_dir}
|
||||
|
||||
%files source
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{src_install_dir}
|
||||
|
||||
%changelog
|
||||
* Mon Apr 07 2025 xinghe <xinghe2@h-partners.com> - 5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b-1
|
||||
- Init Package
|
||||
4
opencensus-cpp.yaml
Normal file
4
opencensus-cpp.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: census-instrumentation/opencensus-cpp
|
||||
tag_prefix: ^v
|
||||
separator: .
|
||||
Loading…
x
Reference in New Issue
Block a user