1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
7 version = %{main_version}
8 # Release cannot be reset because the sub-packages won't get updated
10 thisapp = db-%{version}
12 maintainer = Michael Tremer <michael.tremer@ipfire.org>
13 groups = System/Libraries
14 url = http://www.oracle.com/technology/products/berkeley-db/
16 summary = The Berkeley DB database compatibility library.
19 Berkeley DB (BDB) is a computer software library that provides
20 a high-performance embedded database.
22 This package contains various version that were used in the
23 past. Some software may depend on them though.
31 versions = %{version_db53} %{version_db52} %{version_db48} %{version_db47} %{version_db46}
32 main_version:= %{version_db53}
34 source_dl = http://download.oracle.com/berkeley-db/
35 sources = db-%{version_db53}.tar.gz
36 sources += db-%{version_db52}.tar.gz
37 sources += db-%{version_db48}.tar.gz
38 sources += db-%{version_db47}.tar.gz
39 sources += db-%{version_db46}.tar.gz
46 CFLAGS += -fno-strict-aliasing
49 configure_options += \
55 for version in %{versions}; do
56 cd %{DIR_SRC}/db-${version}/build_unix
62 make %{PARALLELISMFLAGS}
67 for version in %{versions}; do
68 cd %{DIR_SRC}/db-${version}/build_unix
69 make install DESTDIR=%{BUILDROOT} \
70 docdir=%{datadir}/doc/db-${version}
72 # Remove unversioned libs.
73 rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
76 tag=$(echo ${version} | cut -c1,3)
77 for bin in %{BUILDROOT}%{bindir}/*db_*; do
78 t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
83 major=$(echo ${version} | cut -c1-3)
84 mkdir -pv %{BUILDROOT}%{libdir}/db${version}
85 pushd %{BUILDROOT}%{libdir}/db${version}
86 ln -svf ../libdb-${major}.so libdb.so
87 ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
89 rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
92 mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
93 mv -v %{BUILDROOT}%{includedir}/*.h \
94 %{BUILDROOT}%{includedir}/db-${version}/
96 # Remove documentation.
97 rm -rf %{BUILDROOT}%{datadir}/doc
105 compat-db53 = %{version_db53}-%{_release}
106 compat-db52 = %{version_db52}-%{_release}
107 compat-db48 = %{version_db48}-%{_release}
108 compat-db47 = %{version_db47}-%{_release}
109 compat-db46 = %{version_db46}-%{_release}
114 version = %{version_db%{version_tag}}
116 summary = The Berkeley DB database %{version} compatibility library.
118 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
119 embedded database support for both traditional and client/server applications.
121 This package contains Berkeley DB library version %{version} used for compatibility.
125 %{bindir}/berkeley_db%{version_tag}_*
126 %{bindir}/db%{version_tag}_*
127 %{libdir}/db%{version}
128 %{libdir}/libdb*-%{version_major}.so
132 db4 < 1:%{version_major}
133 db4-devel < 1:%{version_major}
134 db4-cxx < 1:%{version_major}
135 db4-utils < 1:%{version_major}
137 libdb < %{version_major}
141 libdb = %{version_major}
180 package %{name}-headers
181 summary = The Berkeley DB database compatibility headers.
183 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
184 embedded database support for both traditional and client/server applications.
186 This package contains Berkeley DB library headers used for compatibility.
190 files = %{includedir}
193 compat-db = %{main_version}-%{_release}
197 package %{name}-debuginfo