From 1311e0a16fef7415f2473b3836f49608d1e154be 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 4c566a2e..1a1721b5 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -53,6 +53,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} @@ -247,6 +248,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 @@ -382,6 +384,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 @@ -1148,6 +1160,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 @@ -2010,6 +2028,7 @@ Collectd utilities %{?_with_ceph} \ %{?_with_cgroups} \ %{?_with_chrony} \ + %{?_with_connectivity} \ %{?_with_conntrack} \ %{?_with_contextswitch} \ %{?_with_cpufreq} \ @@ -2558,6 +2577,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