[packages/prometheus-cpp] - new
qboosh
qboosh at pld-linux.org
Mon Apr 28 20:24:54 CEST 2025
commit 7bc486cb0fcb91921d74475881b3aa71de723e24
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Apr 28 20:11:29 2025 +0200
- new
prometheus-cpp.spec | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
---
diff --git a/prometheus-cpp.spec b/prometheus-cpp.spec
new file mode 100644
index 0000000..3e0c1e9
--- /dev/null
+++ b/prometheus-cpp.spec
@@ -0,0 +1,107 @@
+#
+# Conditional build:
+%bcond_with tests # unit/integration tests/benchmarks (local networking required)
+
+Summary: Prometheus Client Library for Modern C++
+Summary(pl.UTF-8): Biblioteki klienckie Prometheusa dla współczesnego C++
+Name: prometheus-cpp
+Version: 1.3.0
+Release: 1
+License: MIT
+Group: Libraries
+#Source0Download: https://github.com/jupp0r/prometheus-cpp/releases
+Source0: https://github.com/jupp0r/prometheus-cpp/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 807270765d57e3d68581a0c23d2c5d13
+URL: https://github.com/jupp0r/prometheus-cpp
+BuildRequires: civetweb-cpp-devel
+BuildRequires: cmake >= 3.14
+BuildRequires: curl-devel
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: zlib-devel
+%if %{with tests}
+BuildRequires: gmock-devel >= 1.8.1
+BuildRequires: google-benchmark-devel
+BuildRequires: gtest-devel >= 1.8.1
+%endif
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This library aims to enable Metrics-Driven Development
+(<https://sookocheff.com/post/mdd/mdd/>) for C++ services. It
+implements the Prometheus Data Model
+(<https://prometheus.io/docs/concepts/data_model/>), a powerful
+abstraction on which to collect and expose metrics. We offer the
+possibility for metrics to be collected by Prometheus, but other
+push/pull collections can be added as plugins.
+
+%description -l pl.UTF-8
+Celem biblioteki jest umożliwienie Metrics-Driven Development
+(<https://sookocheff.com/post/mdd/mdd/>) w usługach C++.
+Implementuje Prometheus Data Model
+(<https://prometheus.io/docs/concepts/data_model/>) - potężnej
+abstrakcji do zbierania i udostępniania metryk. Biblioteka
+oferuje możliwość zbierania metryk przez Prometheusa, ale jako
+wtyczki mogą być dodane także inne kolekcje push/pull.
+
+%package devel
+Summary: Header files for Prometheus C++ libraries
+Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Prometheus C++
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: civetweb-cpp-devel
+Requires: curl-devel
+Requires: zlib-devel
+
+%description devel
+Header files for Prometheus C++ libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek Prometheus C++.
+
+%prep
+%setup -q
+
+%build
+%cmake -B build \
+ %{!?with_tests:-DENABLE_TESTING=OFF} \
+ -DUSE_THIRDPARTY_LIBRARIES=OFF
+
+%{__make} -C build
+
+%if %{with tests}
+ctest --test-dir build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_libdir}/libprometheus-cpp-core.so.*.*.*
+%ghost %{_libdir}/libprometheus-cpp-core.so.1.3
+%attr(755,root,root) %{_libdir}/libprometheus-cpp-pull.so.*.*.*
+%ghost %{_libdir}/libprometheus-cpp-pull.so.1.3
+%attr(755,root,root) %{_libdir}/libprometheus-cpp-push.so.*.*.*
+%ghost %{_libdir}/libprometheus-cpp-push.so.1.3
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libprometheus-cpp-core.so
+%{_libdir}/libprometheus-cpp-pull.so
+%{_libdir}/libprometheus-cpp-push.so
+%{_includedir}/prometheus
+%{_libdir}/cmake/prometheus-cpp
+%{_pkgconfigdir}/prometheus-cpp-core.pc
+%{_pkgconfigdir}/prometheus-cpp-pull.pc
+%{_pkgconfigdir}/prometheus-cpp-push.pc
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/prometheus-cpp.git/commitdiff/7bc486cb0fcb91921d74475881b3aa71de723e24
More information about the pld-cvs-commit
mailing list