[Pacemaker] [PATCH 1 of 2] Low: build: add --without snmp flag to RPM spec

Florian Haas florian.haas at linbit.com
Thu Feb 18 06:38:37 EST 2010


# HG changeset patch
# User Florian Haas <florian.haas at linbit.com>
# Date 1266490897 -3600
# Branch stable-1.0
# Node ID cc3c3e83e77fbde81186c0b9ca95b08402942092
# Parent  9600297d047874796cbebf3fcfb679e2fd412b98
Low: build: add --without snmp flag to RPM spec

SNMP traps only work from net-snmp 5.4 forward. Require net-snmp 5.4
or later and for being able to build on platforms where that release
is not available, add a --without snmp conditional build flag.

diff -r 9600297d0478 -r cc3c3e83e77f pacemaker.spec
--- a/pacemaker.spec	Wed Feb 17 13:04:09 2010 +0100
+++ b/pacemaker.spec	Thu Feb 18 12:01:37 2010 +0100
@@ -26,6 +26,8 @@
 # ESMTP is not available in RHEL, only in EPEL. Allow people to build
 # the RPM without ESMTP in case they choose not to use EPEL packages
 %bcond_without esmtp
+# SNMP trap support only works with Net-SNMP 5.4 and above
+%bcond_without snmp
 
 Name:		pacemaker
 Summary:	Scalable High-Availability cluster resource manager
@@ -58,11 +60,15 @@
 BuildRequires:	pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel
 
 # Enables optional functionality
-BuildRequires:	ncurses-devel net-snmp-devel openssl-devel 
+BuildRequires:	ncurses-devel openssl-devel
 BuildRequires:	lm_sensors-devel libselinux-devel
 %if %{with esmtp}
 BuildRequires:	libesmtp-devel
 %endif
+%if %{with snmp}
+BuildRequires:	net-snmp-devel >= 5.4
+Requires:		net-snmp >= 5.4
+%endif
 
 %if %{with ais}
 BuildRequires:	corosynclib-devel
@@ -86,7 +92,7 @@
 resource health.
 
 Available rpmbuild rebuild options:
-  --without : heartbeat ais
+  --without : heartbeat ais snmp
 
 %package -n pacemaker-libs
 License:	GPLv2+ and LGPLv2+





More information about the Pacemaker mailing list