diff --git a/60eaa4ea47b16751a8e8740b05fe70914c68a480.tar.gz b/60eaa4ea47b16751a8e8740b05fe70914c68a480.tar.gz new file mode 100644 index 0000000..d2f0912 Binary files /dev/null and b/60eaa4ea47b16751a8e8740b05fe70914c68a480.tar.gz differ diff --git a/prometheus-cpp.spec b/prometheus-cpp.spec new file mode 100644 index 0000000..6bf3eeb --- /dev/null +++ b/prometheus-cpp.spec @@ -0,0 +1,72 @@ +%define libname lib%{name} + +Name: prometheus-cpp +Version: 60eaa4ea47b16751a8e8740b05fe70914c68a480 +Release: 1 +Summary: Prometheus client library for C++ +License: MIT +URL: https://github.com/jupp0r/prometheus-cpp +Source0: https://github.com/jupp0r/prometheus-cpp/archive/%{version}.tar.gz + +BuildRequires: civetweb-devel gmock-devel +BuildRequires: cmake gcc-c++ +BuildRequires: libcurl-devel +BuildRequires: zlib-devel + +%description +Prometheus-cpp aims to enable Metrics-Driven Development for C++ services. It +implements the Prometheus Data Model, a powerful abstraction on which to collect +and expose metrics. It offers the possibility for metrics to be collected by +Prometheus, but other push/pull collections can be added as plugins. + +%package -n %{libname} +Summary: Shared libraries for prometheus-cpp + +%description -n %{libname} +Prometheus-cpp aims to enable Metrics-Driven Development for C++ services. It +implements the Prometheus Data Model, a powerful abstraction on which to collect +and expose metrics. It offers the possibility for metrics to be collected by +Prometheus, but other push/pull collections can be added as plugins. + +This package provides development files for prometheus-cpp. + +%package devel +Summary: Development files for prometheus-cpp +Requires: %{libname} = %{version} + +%description devel +Prometheus-cpp aims to enable Metrics-Driven Development for C++ services. It +implements the Prometheus Data Model, a powerful abstraction on which to collect +and expose metrics. It offers the possibility for metrics to be collected by +Prometheus, but other push/pull collections can be added as plugins. + +This package provides development files for prometheus-cpp. + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +%cmake -S . -B %{_vpath_builddir} \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DBUILD_CONFIG=rpmbuild \ + -DENABLE_TESTING:BOOL=ON \ + -DUSE_THIRDPARTY_LIBRARIES:BOOL=OFF + +%__cmake --build %{_vpath_builddir} %{?_smp_mflags} --verbose + +%install +DESTDIR="%{buildroot}" %__cmake --install %{_vpath_builddir} + +%files -n %{libname} +%license LICENSE +%doc README.md +%{_libdir}/lib%{name}*.so.* + +%files devel +%{_includedir}/prometheus +%{_libdir}/cmake/%{name} +%{_libdir}/lib%{name}*.so + +%changelog +* Mon Apr 07 2025 xinghe - 60eaa4ea47b16751a8e8740b05fe70914c68a480-1 +- Init Package diff --git a/prometheus-cpp.yaml b/prometheus-cpp.yaml new file mode 100644 index 0000000..de48aac --- /dev/null +++ b/prometheus-cpp.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: jupp0r/prometheus-cpp +tag_prefix: ^v +separator: .