Blame 0001-Feature-offer-alternatives-to-libraries-from-cluster.patch

Jan Pokorný 0c140f
From d44c03a264dc10715c197b1160a7fcdaf7b52a5c Mon Sep 17 00:00:00 2001
Jan Pokorný b4585a
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Jan Pokorný b4585a
Date: Tue, 26 Apr 2016 16:43:50 +0200
Jan Pokorný b4585a
Subject: [PATCH 1/6] Feature: offer alternatives to libraries from
Jan Pokorný b4585a
 (cluster-)glue
Jan Pokorný b4585a
Jan Pokorný b4585a
This revision is a preparation work establishing --without-glue switch
Jan Pokorný b4585a
to configure that will eventually allow non-glue alternatives.
Jan Pokorný b4585a
Jan Pokorný b4585a
The analogous conditional is added to the spec file, based on premise
Jan Pokorný 0c140f
that cluster-glue will not be re-introduced into Fedora, RHEL, etc.
Jan Pokorný b4585a
---
Jan Pokorný b4585a
 booth.spec      | 20 +++++++++++++++++---
Jan Pokorný b4585a
 configure.ac    |  5 +++++
Jan Pokorný b4585a
 src/Makefile.am |  6 +++---
Jan Pokorný b4585a
 3 files changed, 25 insertions(+), 6 deletions(-)
Jan Pokorný b4585a
Jan Pokorný b4585a
diff --git a/booth.spec b/booth.spec
Jan Pokorný b4585a
index cd54ab1..f73d2d8 100644
Jan Pokorný b4585a
--- a/booth.spec
Jan Pokorný b4585a
+++ b/booth.spec
Jan Pokorný b4585a
@@ -1,5 +1,11 @@
Jan Pokorný b4585a
 %bcond_with html_man
Jan Pokorný b4585a
 
Jan Pokorný b4585a
+%if 0%{?fedora} > 18 || 0%{?centos} > 6 || 0%{?rhel} > 6
Jan Pokorný b4585a
+%bcond_with glue
Jan Pokorný b4585a
+%else
Jan Pokorný b4585a
+%bcond_without glue
Jan Pokorný b4585a
+%endif
Jan Pokorný b4585a
+
Jan Pokorný b4585a
 %if 0%{?suse_version}
Jan Pokorný b4585a
 %global booth_docdir %{_defaultdocdir}/%{name}
Jan Pokorný b4585a
 %else
Jan Pokorný b4585a
@@ -50,17 +56,24 @@ BuildRequires:  pkgconfig(glib-2.0)
Jan Pokorný b4585a
 %endif
Jan Pokorný b4585a
 BuildRequires:  libgcrypt-devel
Jan Pokorný b4585a
 %if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
Jan Pokorný b4585a
-BuildRequires:  cluster-glue-libs-devel
Jan Pokorný b4585a
 BuildRequires:  pacemaker-libs-devel
Jan Pokorný b4585a
 %else
Jan Pokorný b4585a
-BuildRequires:  libglue-devel
Jan Pokorný b4585a
 BuildRequires:  libpacemaker-devel
Jan Pokorný b4585a
 %endif
Jan Pokorný b4585a
+%if 0%{?with_glue}
Jan Pokorný b4585a
+%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
Jan Pokorný b4585a
+BuildRequires:  cluster-glue-libs-devel
Jan Pokorný b4585a
+%else
Jan Pokorný b4585a
+BuildRequires:  libglue-devel
Jan Pokorný b4585a
+%endif
Jan Pokorný b4585a
+%endif
Jan Pokorný b4585a
 BuildRequires:  libxml2-devel
Jan Pokorný b4585a
 BuildRequires:  zlib-devel
Jan Pokorný b4585a
 %if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
Jan Pokorný b4585a
 Requires:       pacemaker >= 1.1.8
Jan Pokorný b4585a
+%if 0%{?with_glue}
Jan Pokorný b4585a
 Requires:       cluster-glue-libs >= 1.0.6
Jan Pokorný b4585a
+%endif
Jan Pokorný b4585a
 %else
Jan Pokorný b4585a
 Requires:       pacemaker-ticket-support >= 2.0
Jan Pokorný b4585a
 %endif
Jan Pokorný b4585a
@@ -79,7 +92,8 @@ Pacemaker.
Jan Pokorný b4585a
 %configure \
Jan Pokorný b4585a
 	--with-initddir=%{_initrddir} \
Jan Pokorný b4585a
 	--docdir=%{booth_docdir} \
Jan Pokorný b4585a
-	%{!?with_html_man:--without-html_man}
Jan Pokorný b4585a
+	%{!?with_html_man:--without-html_man} \
Jan Pokorný b4585a
+	%{!?with_glue:--without-glue}
Jan Pokorný b4585a
 
Jan Pokorný b4585a
 make
Jan Pokorný b4585a
 
Jan Pokorný b4585a
diff --git a/configure.ac b/configure.ac
Jan Pokorný 0c140f
index ab2ad43..1a8ed4c 100644
Jan Pokorný b4585a
--- a/configure.ac
Jan Pokorný b4585a
+++ b/configure.ac
Jan Pokorný 0c140f
@@ -215,6 +215,11 @@ AC_ARG_WITH([html_man],
Jan Pokorný 0c140f
 	[],
Jan Pokorný 0c140f
 	[with_html_man=yes])
Jan Pokorný b4585a
 
Jan Pokorný b4585a
+AC_ARG_WITH([glue],
Jan Pokorný b4585a
+	[  --without-glue                  : Avoid libraries from (cluster-)glue project.],
Jan Pokorný b4585a
+	[],
Jan Pokorný b4585a
+	[with_glue=yes])
Jan Pokorný b4585a
+
Jan Pokorný b4585a
 # OS detection
Jan Pokorný b4585a
 # THIS SECTION MUST DIE!
Jan Pokorný b4585a
 CP=cp
Jan Pokorný b4585a
diff --git a/src/Makefile.am b/src/Makefile.am
Jan Pokorný b4585a
index 7d05d76..e7f5aa2 100644
Jan Pokorný b4585a
--- a/src/Makefile.am
Jan Pokorný b4585a
+++ b/src/Makefile.am
Jan Pokorný b4585a
@@ -10,6 +10,9 @@ sbin_PROGRAMS		= boothd
Jan Pokorný b4585a
 boothd_SOURCES	 	= config.c main.c raft.c ticket.c  transport.c \
Jan Pokorný b4585a
 			  pacemaker.c handler.c request.c attr.c
Jan Pokorný b4585a
 
Jan Pokorný b4585a
+noinst_HEADERS		= booth.h pacemaker.h \
Jan Pokorný b4585a
+			  config.h log.h raft.h ticket.h transport.h handler.h request.h attr.h
Jan Pokorný b4585a
+
Jan Pokorný b4585a
 if BUILD_TIMER_C
Jan Pokorný b4585a
 boothd_SOURCES += timer.c
Jan Pokorný b4585a
 endif
Jan Pokorný b4585a
@@ -22,8 +25,5 @@ boothd_LDFLAGS		= $(OS_DYFLAGS) -L./
Jan Pokorný b4585a
 boothd_LDADD		= -lplumb -lplumbgpl -lm $(GLIB_LIBS) $(ZLIB_LIBS)
Jan Pokorný b4585a
 boothd_CFLAGS		= $(GLIB_CFLAGS)
Jan Pokorný b4585a
 
Jan Pokorný b4585a
-noinst_HEADERS		= booth.h pacemaker.h \
Jan Pokorný b4585a
-			  config.h log.h raft.h ticket.h transport.h handler.h request.h attr.h
Jan Pokorný b4585a
-
Jan Pokorný b4585a
 lint:
Jan Pokorný b4585a
 	-splint $(INCLUDES) $(LINT_FLAGS) $(CFLAGS) *.c
Jan Pokorný b4585a
-- 
Jan Pokorný b4585a
2.4.11
Jan Pokorný b4585a