1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
7 version = %{version_db47}
9 thisapp = db-%{version}
11 maintainer = Michael Tremer <michael.tremer@ipfire.org>
12 groups = System/Libraries
13 url = http://www.oracle.com/technology/products/berkeley-db/
15 summary = The Berkeley DB database compatibility library.
18 Berkeley DB (BDB) is a computer software library that provides
19 a high-performance embedded database.
21 This package contains various version that were used in the
22 past. Some software may depend on them though.
27 versions = %{version_db47} %{version_db46}
29 source_dl = http://download.oracle.com/berkeley-db/
30 sources = db-%{version_db47}.tar.gz
31 sources += db-%{version_db46}.tar.gz
38 CFLAGS += -fno-strict-aliasing
40 configure_options += \
46 for version in %{versions}; do
47 cd %{DIR_SRC}/db-${version}/build_unix
53 make %{PARALLELISMFLAGS}
58 for version in %{versions}; do
59 cd %{DIR_SRC}/db-${version}/build_unix
60 make install DESTDIR=%{BUILDROOT} \
61 docdir=%{datadir}/doc/db-${version}
63 # Remove unversioned libs.
64 rm -vf %{BUILDROOT}%{libdir}/libdb*-4.so
67 tag=$(echo ${version} | cut -c1,3)
68 for bin in %{BUILDROOT}%{bindir}/*db_*; do
69 t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
74 major=$(echo ${version} | cut -c1-3)
75 mkdir -pv %{BUILDROOT}%{libdir}/db${version}
76 pushd %{BUILDROOT}%{libdir}/db${version}
77 ln -svf ../libdb-${major}.so libdb.so
78 ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
80 rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
83 mkdir -pv %{BUILDROOT}%{includedir}/db${version}
84 mv -v %{BUILDROOT}%{includedir}/*.h \
85 %{BUILDROOT}%{includedir}/db${version}/
87 # Remove documentation.
88 rm -rf %{BUILDROOT}%{datadir}/doc
95 requires += compat-db46 = %{version_db46}
96 requires += compat-db47 = %{version_db47}
100 version = %{version_db%{version_tag}}
102 summary = The Berkeley DB database %{version} compatibility library.
104 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
105 embedded database support for both traditional and client/server applications.
107 This package contains Berkeley DB library version %{version} used for compatibility.
111 %{bindir}/berkeley_db%{version_tag}_*
112 %{bindir}/db%{version_tag}_*
113 %{libdir}/db%{version}
114 %{libdir}/libdb*-%{version_major}.so
117 requires = compat-db-headers = %{thisver}
119 db4 < 1:%{version_major}
120 db4-devel < 1:%{version_major}
121 db4-cxx < 1:%{version_major}
122 db4-utils < 1:%{version_major}
140 package %{name}-headers
141 summary = The Berkeley DB database compatibility headers.
143 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
144 embedded database support for both traditional and client/server applications.
146 This package contains Berkeley DB library headers used for compatibility.
150 files = %{includedir}
153 package %{name}-debuginfo