From a781eb2c59a9b65c30cbbe0880ea6aab90e65c0e Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 6 Aug 2014 16:59:21 +0200 Subject: [PATCH] RedHat RPM spec: add modbus plugin ... now that EPEL6 provides libmodbus --- contrib/redhat/collectd.spec | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 4f70fd69..2e374c66 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -44,6 +44,7 @@ %{?el6:%global _has_working_libiptc 1} %{?el6:%global _has_ip_vs_h 1} %{?el6:%global _has_perl_extutils_embed 1} +%{?el6:%global _has_libmodbus 1} # plugins enabled by default %define with_aggregation 0%{!?_without_aggregation:1} @@ -89,6 +90,7 @@ %define with_memcached 0%{!?_without_memcached:1} %define with_memory 0%{!?_without_memory:1} %define with_multimeter 0%{!?_without_multimeter:1} +%define with_modbus 0%{!?_without_modbus:0%{?_has_libmodbus}} %define with_mysql 0%{!?_without_mysql:1} %define with_network 0%{!?_without_network:1} %define with_nfs 0%{!?_without_nfs:1} @@ -141,8 +143,6 @@ %define with_apple_sensors 0%{!?_without_apple_sensors:0} # plugin lpar disabled, requires AIX %define with_lpar 0%{!?_without_lpar:0} -# plugin modbus disabled, requires libmodbus -%define with_modbus 0%{!?_without_modbus:0} # plugin netapp disabled, requires libnetapp %define with_netapp 0%{!?_without_netapp:0} # plugin netlink disabled, requires libnetlink.h @@ -383,6 +383,16 @@ instance. Note that another plugin, named `memcached', exists and does a similar job, without requiring the installation of libmemcached. %endif +%if %{with_modbus} +%package modbus +Summary: modbus plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: libmodbus-devel +%description modbus +The modbus plugin collects values from Modbus/TCP enabled devices +%endif + %if %{with_mysql} %package mysql Summary: MySQL plugin for collectd @@ -912,6 +922,12 @@ Development files for libcollectdclient %define _with_multimeter --disable-multimeter %endif +%if %{with_modbus} +%define _with_modbus --enable-modbus +%else +%define _with_modbus --disable-modbus +%endif + %if %{with_mysql} %define _with_mysql --enable-mysql %else @@ -1873,6 +1889,9 @@ fi %doc contrib/ %changelog +* Wed Aug 06 2014 Marc Fournier 5.3.1-2 +- Enabled modbus plugin + * Tue Aug 06 2013 Marc Fournier 5.3.1-1 - New upstream version - Added RHEL5 support: -- 2.11.0