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