db: Reorganize Berkeley Database Packaging

Currently, the berkeley databases resuses a lot of the same code for the
expressions of each version. This consolidates all of the build routines
similar to that of the linux kernel.

This patch also adds version 6 of BDB.
This commit is contained in:
William A. Kennington III
2014-02-15 12:03:01 +01:00
committed by Bjørn Forsman
parent 68b3fd33a7
commit 99f5d2edb4
16 changed files with 88 additions and 130 deletions
+41
View File
@@ -0,0 +1,41 @@
{ stdenv, fetchurl
, cxxSupport ? true
, compat185 ? true
# Options from inherited versions
, version, sha256
, extraPatches ? [ ]
, license ? "Berkeley Database License"
}:
stdenv.mkDerivation rec {
name = "db-${version}";
src = fetchurl {
url = "http://download.oracle.com/berkeley-db/${name}.tar.gz";
sha256 = sha256;
};
patches = extraPatches;
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")
];
preConfigure = ''
cd build_unix
configureScript=../dist/configure
'';
postInstall = ''
rm -rf $out/docs
'';
meta = with stdenv.lib; {
homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html";
description = "Berkeley DB";
license = license;
platforms = platforms.unix;
};
}