From 195dba76e020c710435ea91c89319295b264aeca Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Tue, 19 Jun 2018 10:56:09 -0400 Subject: [PATCH] Connectivity RPM specfile --- contrib/redhat/collectd.spec | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index d84b457b..079430d3 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -49,6 +49,7 @@ %define with_ceph 0%{!?_without_ceph:1} %define with_cgroups 0%{!?_without_cgroups:1} %define with_chrony 0%{!?_without_chrony:1} +%define with_connectivity 0%{!?_without_connectivity:1} %define with_conntrack 0%{!?_without_conntrack:1} %define with_contextswitch 0%{!?_without_contextswitch:1} %define with_cpu 0%{!?_without_cpu:1} @@ -233,6 +234,7 @@ # Plugins not buildable on RHEL < 7 %if 0%{?rhel} && 0%{?rhel} < 7 +%define with_connectivity 0 %define with_cpusleep 0 %define with_gps 0 %define with_mqtt 0 @@ -356,6 +358,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Chrony plugin for collectd %endif +%if %{with_connectivity} +%package connectivity +Summary: Connectivity plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: yajl-devel +%description connectivity +Monitors network interface up/down status via netlink library. +%endif + %if %{with_curl} %package curl Summary: Curl plugin for collectd @@ -1075,6 +1087,12 @@ Collectd utilities %define _with_chrony --disable-chrony %endif ++%if %{with_connectivity} ++%define _with_connectivity --enable-connectivity ++%else ++%define _with_connectivity --disable-connectivity ++%endif + %if %{with_conntrack} %define _with_conntrack --enable-conntrack %else @@ -1899,6 +1917,7 @@ Collectd utilities %{?_with_ceph} \ %{?_with_cgroups} \ %{?_with_chrony} \ + %{?_with_connectivity} \ %{?_with_conntrack} \ %{?_with_contextswitch} \ %{?_with_cpufreq} \ @@ -2434,6 +2453,11 @@ fi %{_libdir}/%{name}/chrony.so %endif +%if %{with_connectivity} +%files connectivity +%{_libdir}/%{name}/connectivity.so +%endif + %if %{with_curl} %files curl %{_libdir}/%{name}/curl.so -- 2.11.0