summaryrefslogtreecommitdiffstats
path: root/ctdb/packaging/RPM
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-05-09 16:03:00 +1000
committerMartin Schwenke <martin@meltin.net>2012-05-11 10:33:27 +1000
commit0fa93a961394ac77c1c5e0cf24f8a66be275274d (patch)
tree267ea2cb7552bac89eae1ccb439e81c07f5f94d1 /ctdb/packaging/RPM
parentfd048a1771e2a1d7fe28624e9c914836930c69f9 (diff)
downloadsamba-0fa93a961394ac77c1c5e0cf24f8a66be275274d.tar.gz
samba-0fa93a961394ac77c1c5e0cf24f8a66be275274d.tar.xz
samba-0fa93a961394ac77c1c5e0cf24f8a66be275274d.zip
Packaging: add options to ctdb.spec.in to force use of bundled libraries
Ideas borrowed from the Fedora samba4 spec file. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 14a630cbc638d2f3bf699de5d94131e5f7d1a3ea)
Diffstat (limited to 'ctdb/packaging/RPM')
-rw-r--r--ctdb/packaging/RPM/ctdb.spec.in31
1 files changed, 30 insertions, 1 deletions
diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in
index 26e738ab10..4db49f9d9c 100644
--- a/ctdb/packaging/RPM/ctdb.spec.in
+++ b/ctdb/packaging/RPM/ctdb.spec.in
@@ -20,10 +20,30 @@ Provides: ctdb = %{version}
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
+# Always use the bundled versions of these libraries.
+%define with_included_talloc 1
+%define with_included_tdb 1
+%define with_included_tevent 1
+
+# If the above options are changed then mandate minimum system
+# versions.
+%define libtalloc_version 2.0.6
+%define libtdb_version 1.2.9
+%define libtevent_version 0.9.13
+
+%if ! %with_included_talloc
+BuildRequires: libtalloc-devel >= %{libtalloc_version}
+%endif
+%if ! %with_included_tdb
+BuildRequires: libtdb-devel >= %{libtdb_version}
+%endif
+%if ! %with_included_tevent
+BuildRequires: libtevent-devel >= %{libtevent_version}
+%endif
+
%description
ctdb is the clustered database used by samba
-
#######################################################################
@@ -48,6 +68,15 @@ export CC
./autogen.sh
CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\"" ./configure \
+%if %with_included_talloc
+ --with-included-talloc \
+%endif
+%if %with_included_tdb
+ --with-included-tdb \
+%endif
+%if %with_included_tevent
+ --with-included-tevent \
+%endif
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \