packaging: Allow building RPMs with system tdb/talloc/tevent
authorAmitay Isaacs <amitay@gmail.com>
Thu, 4 Jul 2013 05:14:10 +0000 (15:14 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 4 Jul 2013 10:41:51 +0000 (20:41 +1000)
To build CTDB RPMs with system installed libraries, use following command:

  ./packaging/RPM/makerpms.sh \
    --with system_talloc \
    --with system_tdb \
    --with system_tevent

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
packaging/RPM/ctdb.spec.in

index bcd38b144090f946c8c73b9577c2f4d854af690f..19c006f7f7f0a29b180a4ca362dc0f9bec47a122 100644 (file)
@@ -24,13 +24,16 @@ 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
+# Allow build with system libraries
+# To enable, run rpmbuild with,
+#      "--with system_talloc"
+#      "--with system_tdb"
+#      "--with system_tevent"
+%define with_included_talloc %{?_with_system_talloc: 0} %{?!_with_system_talloc: 1}
+%define with_included_tdb %{?_with_system_tdb: 0} %{?!_with_system_tdb: 1}
+%define with_included_tevent %{?_with_system_tevent: 0} %{?!_with_system_tevent: 1}
 
-# If the above options are changed then mandate minimum system
-# versions.
+# Required minimum library versions when building with system libraries
 %define libtalloc_version 2.0.8
 %define libtdb_version 1.2.11
 %define libtevent_version 0.9.18