Browse Source

rpm: use internal bdb

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7436 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 11 years ago
parent
commit
e0b39a2d52
1 changed files with 24 additions and 5 deletions
  1. 24 5
      r/rpm/rpm-vl.spec

+ 24 - 5
r/rpm/rpm-vl.spec

@@ -5,6 +5,9 @@
 %define	with_python_version	2.7%{nil}
 %define	with_apidocs		1%{nil}
 
+%bcond_without int_bdb
+%define bdbver 5.3.21
+
 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
 %define	_noPayloadPrefix	1
 
@@ -24,12 +27,15 @@ Summary: The RPM package management system.
 Summary(ja): RPM パッケージ管理システム
 Name: rpm
 Version: 4.10.1
-%{expand: %%define rpm_version %{version}}
-Release: 2%{_dist_release}
+%define rpm_version %{version}
+Release: 3%{_dist_release}
 Group: System Environment/Base
 License: GPL
 
 Source: http://rpm.org/releases/rpm-4.8.x/rpm-%{version}.tar.bz2
+%if %{with int_bdb}
+Source1: db-%{bdbver}.tar.gz
+%endif
 Source10: macros.vine
 Source100: rpm-4.10.1-ja.po
 Source110: GROUPS_for_vine.txt
@@ -85,7 +91,9 @@ Requires(postun): coreutils, shadow-utils
 Requires: popt >= 1.10.2.1
 Requires: nss >= 3.12.5
 Requires: rpm-libs = %{version}
+%if %{without int_bdb}
 Requires: db4-utils
+%endif
 
 Obsoletes: rpm-perl < %{version}
 
@@ -107,7 +115,9 @@ BuildRequires: lua-devel
 BuildRequires: libcap-devel
 BuildRequires: libacl-devel
 BuildRequires: nss-devel
+%if %{without int_bdb}
 BuildRequires: db4-devel >= 4.8
+%endif
 BuildRequires: xz-devel
 BuildRequires: file-devel
 
@@ -224,7 +234,7 @@ that will manipulate RPM packages and databases.
 
 
 %prep
-%setup -q
+%setup -q %{?with_int_bdb:-a 1}
 %patch1 -p1 -b .pkgconfig-path
 
 %patch301 -p1 -b .niagara
@@ -269,6 +279,10 @@ cp -f %{SOURCE100} po/ja.po
 
 cp %{SOURCE110} %{SOURCE120} .
 
+%if %{with int_bdb}
+ln -s db-%{bdbver} db
+%endif
+
 rm -rf popt/
 
 %build
@@ -293,6 +307,7 @@ export CPPFLAGS CFLAGS
     --libdir=%{_libdir} \
     --sysconfdir=/etc \
     --localstatedir=/var \
+    --sharedstatedir=/var/lib \
     --infodir='%{__share}/info' \
     --mandir='%{__share}/man' \
     --build=%{_target_platform} \
@@ -302,8 +317,7 @@ export CPPFLAGS CFLAGS
     --with-lua \
     --with-cap \
     --with-acl \
-    --enable-posixmutexes \
-    --with-external-db \
+    %{!?with_int_bdb: --with-external-db} \
     --without-javaglue \
     --without-perl \
     --without-selinux \
@@ -348,6 +362,7 @@ do
 done
 
 # plant links to db utils as rpmdb_foo so existing documantion is usable
+%if %{without int_bdb}
 for dbutil in \
     archive deadlock dump load printlog \
     recover stat upgrade verify
@@ -355,6 +370,7 @@ do
     ln -s ../../bin/db_${dbutil} $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_${dbutil}
 done
 #ln -s ../../bin/berkeley_db_svc $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_svc
+%endif
 
 # set i386 for _arch in i?86-linux/macros
 %ifarch x86_64
@@ -594,6 +610,9 @@ exit 0
 
 
 %changelog
+* Wed Oct 31 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.10.2-3
+- use internal bdb(5.3.21)
+
 * Thu Oct 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.10.1-2
 - update vine patch
   - split vine specific macros to /etc/rpm/macros.vine