From: Laura Hild Date: Mon, 23 Oct 2023 20:36:06 +0000 (-0400) Subject: Add MMC plugin to redhat specfile X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae787af8b5c0ad6d8e502caff870647aeb0f1617;p=thirdparty%2Fcollectd.git Add MMC plugin to redhat specfile --- diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 8443c1f49..ec4a779b5 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -107,6 +107,7 @@ %define with_memcachec 0%{!?_without_memcachec:1} %define with_memcached 0%{!?_without_memcached:1} %define with_memory 0%{!?_without_memory:1} +%define with_mmc 0%{!?_without_mmc:1} %define with_modbus 0%{!?_without_modbus:1} %define with_mqtt 0%{!?_without_mqtt:1} %define with_multimeter 0%{!?_without_multimeter:1} @@ -638,6 +639,19 @@ The mic plugin collects CPU usage, memory usage, temperatures and power consumption from Intel Many Integrated Core (MIC) CPUs. %endif +%if %{with_mmc} +%package mmc +Summary: MMC plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: systemd-devel +%description mmc +Reads the life time estimates reported by eMMC 5.0+ devices and some more +detailed health metrics, like bad block and erase counts or power cycles, +for Micron and SanDisk eMMCs and some Swissbit MMC cards (MANFID=0x5D +OEMID=0x5342). +%endif + %if %{with_modbus} %package modbus Summary: modbus plugin for collectd @@ -1552,6 +1566,12 @@ Collectd utilities %define _with_mic --disable-mic %endif +%if %{with_mmc} +%define _with_mmc --enable-mmc +%else +%define _with_mmc --disable-mmc +%endif + %if %{with_modbus} %define _with_modbus --enable-modbus %else @@ -2173,6 +2193,7 @@ Collectd utilities %{?_with_memcached} \ %{?_with_memory} \ %{?_with_mic} \ + %{?_with_mmc} \ %{?_with_modbus} \ %{?_with_mqtt} \ %{?_with_multimeter} \ @@ -2812,6 +2833,11 @@ fi %{_libdir}/%{name}/mic.so %endif +%if %{with_mmc} +%files mmc +%{_libdir}/%{name}/mmc.so +%endif + %if %{with_modbus} %files modbus %{_libdir}/%{name}/modbus.so