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 %{BUILDROOT}%{includedir}/db-${version} \
97 %{BUILDROOT}%{includedir}/db-${major}
99 # Remove documentation.
100 rm -rf %{BUILDROOT}%{datadir}/doc
103 # Link latest headers into /usr/include
104 for file in %{BUILDROOT}%{includedir}/db-%{main_version}/*.h; do
105 ln -svf --relative ${file} %{BUILDROOT}%{includedir}/
113 compat-db53 = %{version_db53}-%{_release}
114 compat-db52 = %{version_db52}-%{_release}
115 compat-db48 = %{version_db48}-%{_release}
116 compat-db47 = %{version_db47}-%{_release}
117 compat-db46 = %{version_db46}-%{_release}
122 version = %{version_db%{version_tag}}
124 summary = The Berkeley DB database %{version} compatibility library.
126 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
127 embedded database support for both traditional and client/server applications.
129 This package contains Berkeley DB library version %{version} used for compatibility.
133 %{bindir}/berkeley_db%{version_tag}_*
134 %{bindir}/db%{version_tag}_*
135 %{libdir}/db%{version}
136 %{libdir}/libdb*-%{version_major}.so
140 db4 < 1:%{version_major}
141 db4-devel < 1:%{version_major}
142 db4-cxx < 1:%{version_major}
143 db4-utils < 1:%{version_major}
145 libdb <= %{version_major}
149 libdb = %{version_major}
188 package %{name}-headers
189 summary = The Berkeley DB database compatibility headers.
191 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
192 embedded database support for both traditional and client/server applications.
194 This package contains Berkeley DB library headers used for compatibility.
197 files = %{includedir}
200 compat-db = %{main_version}-%{_release}
204 libdb-devel = %{version_db53}
205 libdb-devel = %{version_db52}
206 db4-devel = %{version_db48}
207 db4-devel = %{version_db47}
208 db4-devel = %{version_db46}
216 package %{name}-debuginfo