SPECS: rpm.spec - berkeley db is optional now (not really usefull ...

arekm arekm at pld-linux.org
Tue Oct 2 14:18:56 CEST 2007


Author: arekm                        Date: Tue Oct  2 12:18:56 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- berkeley db is optional now (not really usefull by default)

---- Files affected:
SPECS:
   rpm.spec (1.840 -> 1.841) 

---- Diffs:

================================================================
Index: SPECS/rpm.spec
diff -u SPECS/rpm.spec:1.840 SPECS/rpm.spec:1.841
--- SPECS/rpm.spec:1.840	Thu Sep 27 15:48:28 2007
+++ SPECS/rpm.spec	Tue Oct  2 14:18:51 2007
@@ -16,11 +16,23 @@
 %bcond_without	selinux		# build without selinux support
 %bcond_without	suggest_tags	# build without Suggest tag (bootstrapping)
 %bcond_with	neon		# build with HTTP/WebDAV support (neon library)
+%bcond_without	db		# BerkeleyDB
 %bcond_with	sqlite		# build with SQLite support
+%bcond_with	sqlite_dbapi	# default database backend is sqlite
 # force_cc		- force using __cc other than "%{_target_cpu}-pld-linux-gcc"
 # force_cxx		- force using __cxx other than "%{_target_cpu}-pld-linux-g++"
 # force_cpp		- force using __cpp other than "%{_target_cpu}-pld-linux-gcc -E"
+#
+%if %{with sqlite_dbapi}
+%define	with_sqlite	1
+%endif
+
+%if %{without db} && %{without sqlite}
+%{error: Need db or sqlite}
+ERROR
+%endif
 
+#
 # versions of required libraries
 %define	reqdb_ver	4.6.18
 %define	reqpopt_ver	1.10.8
@@ -110,7 +122,7 @@
 BuildRequires:	automake >= 1.4
 BuildRequires:	beecrypt-devel >= %{beecrypt_ver}
 BuildRequires:	bzip2-devel >= 1.0.2-17
-BuildRequires:	db-devel >= %{reqdb_ver}
+%{?with_db:BuildRequires:	db-devel >= %{reqdb_ver}}
 BuildRequires:	elfutils-devel >= 0.108
 %ifnarch sparc64
 # -fPIE/-pie
@@ -138,7 +150,7 @@
 # Require static library only for static build
 BuildRequires:	beecrypt-static >= %{beecrypt_ver}
 BuildRequires:	bzip2-static >= 1.0.2-17
-BuildRequires:	db-static >= %{reqdb_ver}
+%{?with_db:BuildRequires:	db-static >= %{reqdb_ver}}
 BuildRequires:	elfutils-static
 BuildRequires:	glibc-static >= 2.2.94
 BuildRequires:	libmagic-static
@@ -248,7 +260,7 @@
 Summary(pl.UTF-8):	Biblioteki RPM-a
 Group:		Libraries
 Requires:	beecrypt >= %{beecrypt_ver}
-Requires:	db >= %{reqdb_ver}
+%{?with_db:Requires:	db >= %{reqdb_ver}}
 %{?with_selinux:Requires:	libselinux >= 1.18}
 Requires:	libmagic >= 1.15-2
 Requires:	popt >= %{reqpopt_ver}
@@ -276,7 +288,7 @@
 Requires:	%{name}-lib = %{version}-%{release}
 Requires:	beecrypt-devel >= %{beecrypt_ver}
 Requires:	bzip2-devel
-Requires:	db-devel >= %{reqdb_ver}
+%{?with_db:Requires:	db-devel >= %{reqdb_ver}}
 Requires:	elfutils-devel
 Requires:	libmagic-devel
 %{?with_selinux:Requires:	libselinux-devel}
@@ -339,7 +351,7 @@
 Requires:	%{name}-devel = %{version}-%{release}
 Requires:	beecrypt-static >= %{beecrypt_ver}
 Requires:	bzip2-static
-Requires:	db-static >= %{reqdb_ver}
+%{?with_db:Requires:	db-static >= %{reqdb_ver}}
 Requires:	elfutils-static
 Requires:	libmagic-static
 Requires:	popt-static >= %{reqpopt_ver}
@@ -704,9 +716,9 @@
 	--with-neon=%{?with_neon:external}%{!?with_neon:no} \
 	--with-file=external \
 	--with-popt=external \
-	--with-db=external \
+	--with-db=%{?with_db:external}%{!?with_db:no} \
 	--with-sqlite=%{?with_sqlite:external}%{!?with_sqlite:no} \
-	--with-dbapi=db \
+	--with-dbapi=%{!?sqlite_dbapi:db}%{?sqlite_dbapi:sqlite} \
 	--with-lua=none \
 	--with-pcre=external \
 	--with-keyutils=none \
@@ -1162,6 +1174,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.841  2007/10/02 12:18:51  arekm
+- berkeley db is optional now (not really usefull by default)
+
 Revision 1.840  2007/09/27 13:48:28  arekm
 - drop some obsolete patches
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/rpm.spec?r1=1.840&r2=1.841&f=u



More information about the pld-cvs-commit mailing list