[Pacemaker] [PATCH 2 of 4] Medium: build: enable --without heartbeat and --without ais as advertised

Florian Haas florian.haas at linbit.com
Fri Feb 5 08:47:19 EST 2010


# HG changeset patch
# User Florian Haas <florian.haas at linbit.com>
# Date 1265375104 -3600
# Branch stable-1.0
# Node ID efc54adb199234e3e7fc8c9b5e2cf3b1924e0923
# Parent  512ca0b73892df791160264d73d96ee095f613ae
Medium: build: enable --without heartbeat and --without ais as advertised

The package %description talks about "--without heartbeat" and "
--without ais" rpmbuild options that were in fact not
implemented. Implement these conditional flags, and ditch the
with_*_support globals.

diff -r 512ca0b73892 -r efc54adb1992 pacemaker.spec
--- a/pacemaker.spec	Fri Feb 05 13:23:47 2010 +0100
+++ b/pacemaker.spec	Fri Feb 05 14:05:04 2010 +0100
@@ -1,7 +1,5 @@
 %global gname haclient
 %global uname hacluster
-%global with_ais_support	1
-%global with_heartbeat_support	1
 %global pcmk_docdir %{_docdir}/%{name}
 
 %global specversion 2
@@ -13,6 +11,12 @@
 
 %global pcmk_release %{?alphatag:0.}%{specversion}%{?alphatag:.%{alphatag}}%{?dist}
 
+# Conditionals
+# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
+# to disable or enable specific features
+%bcond_without ais
+%bcond_without heartbeat
+
 Name:		pacemaker
 Summary:	Scalable High-Availability cluster resource manager
 Version:	1.0.7
@@ -46,12 +50,12 @@
 BuildRequires:	ncurses-devel net-snmp-devel openssl-devel 
 BuildRequires:	libesmtp-devel lm_sensors-devel libselinux-devel
 
-%if %with_ais_support
+%if %{with ais}
 BuildRequires:	corosynclib-devel
 Requires:	corosync
 %endif
 
-%if %with_heartbeat_support
+%if %{with heartbeat}
 BuildRequires:	heartbeat-devel heartbeat-libs
 Requires:	heartbeat >= 3.0.0
 %endif
@@ -94,10 +98,10 @@
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	cluster-glue-libs-devel
 Obsoletes:      libpacemaker3
-%if %with_ais_support
+%if %{with ais}
 Requires:	corosynclib-devel
 %endif
-%if %with_heartbeat_support
+%if %{with heartbeat}
 Requires:	heartbeat-devel
 %endif
 
@@ -149,7 +153,7 @@
 
 # Do not package these either
 rm %{buildroot}/%{_libdir}/heartbeat/crm_primitive.py
-%if %with_ais_support
+%if %{with ais}
 rm %{buildroot}/%{_libdir}/service_crm.so
 %endif
 
@@ -186,7 +190,7 @@
 %{_sbindir}/cibpipe
 %{_sbindir}/crm_node
 
-%if %with_heartbeat_support
+%if %{with heartbeat}
 %{_sbindir}/crm_uuid
 %else
 %exclude %{_sbindir}/crm_uuid
@@ -210,7 +214,7 @@
 %dir /usr/lib/ocf
 %dir /usr/lib/ocf/resource.d
 /usr/lib/ocf/resource.d/pacemaker
-%if %with_ais_support
+%if %{with ais}
 %{_libexecdir}/lcrso/pacemaker.lcrso
 %endif
 




More information about the Pacemaker mailing list