From 7adf52e6b31ffc6323b1d78a8e5ad2c84cc64530 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 28 May 2013 14:19:32 +1000 Subject: [PATCH] packaging: Create separate package for pcp pmda To build ctdb-pcp-pmda package, run packaging/RPM/makerpms.sh script with "--with pmda" option. Signed-off-by: Martin Schwenke Pair-programmed-with: Amitay Isaacs (This used to be ctdb commit 85e11b9b13b3add88c1b8957be51793cc1db4f2d) --- ctdb/packaging/RPM/ctdb.spec.in | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 98724279472..44bd46f6ca0 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -45,6 +45,12 @@ BuildRequires: libtdb-devel >= %{libtdb_version} BuildRequires: libtevent-devel >= %{libtevent_version} %endif +# To build the ctdb-pcp-pmda package, run rpmbuild with "--with pmda" +%define with_pcp_pmda %{?_with_pmda: 1} %{?!_with_pmda: 0} +%if %with_pcp_pmda +BuildRequires: pcp-libs-devel +%endif + %description ctdb is the clustered database used by samba @@ -80,6 +86,9 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE" ./configure \ %endif %if %with_included_tevent --with-included-tevent \ +%endif +%if %with_pcp_pmda + --enable-pmda \ %endif --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ @@ -216,6 +225,24 @@ test suite for ctdb %{_bindir}/ctdb_run_cluster_tests %doc tests/README +%if %with_pcp_pmda + +%package pcp-pmda +Summary: CTDB PCP pmda support +Group: Development/Tools +Requires: ctdb = %{version} +Requires: pcp-libs + +%description pcp-pmda +Performance Co-Pilot (PCP) support for CTDB + +%files pcp-pmda +%dir /var/lib/pcp/pmdas/ctdb +/var/lib/pcp/pmdas/ctdb/* + +%endif + + %changelog * Thu Mar 1 2012 : Version 1.13 -- 2.34.1