prometheus-cpp/prometheus-cpp.spec

73 lines
2.4 KiB
RPMSpec
Raw Permalink Normal View History

2025-04-07 10:53:19 +00:00
%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 <xinghe2@h-partners.com> - 60eaa4ea47b16751a8e8740b05fe70914c68a480-1
- Init Package