220 lines
5.1 KiB
Plaintext
220 lines
5.1 KiB
Plaintext
###############################################################################
|
|
# IPFire.org - An Open Source Firewall Solution #
|
|
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
|
|
###############################################################################
|
|
|
|
name = compat-db
|
|
version = %{main_version}
|
|
# Release cannot be reset because the sub-packages won't get updated
|
|
release = 9
|
|
thisapp = db-%{version}
|
|
|
|
maintainer = Michael Tremer <michael.tremer@ipfire.org>
|
|
groups = System/Libraries
|
|
url = http://www.oracle.com/technology/products/berkeley-db/
|
|
license = Proprietary
|
|
summary = The Berkeley DB database compatibility library.
|
|
|
|
description
|
|
Berkeley DB (BDB) is a computer software library that provides
|
|
a high-performance embedded database.
|
|
|
|
This package contains various version that were used in the
|
|
past. Some software may depend on them though.
|
|
end
|
|
|
|
version_db46 = 4.6.21
|
|
version_db47 = 4.7.25
|
|
version_db48 = 4.8.30
|
|
version_db52 = 5.2.36
|
|
version_db53 = 5.3.28
|
|
versions = %{version_db53} %{version_db52} %{version_db48} %{version_db47} %{version_db46}
|
|
main_version:= %{version_db53}
|
|
|
|
source_dl = http://download.oracle.com/berkeley-db/
|
|
sources = db-%{version_db53}.tar.gz
|
|
sources += db-%{version_db52}.tar.gz
|
|
sources += db-%{version_db48}.tar.gz
|
|
sources += db-%{version_db47}.tar.gz
|
|
sources += db-%{version_db46}.tar.gz
|
|
|
|
build
|
|
requires
|
|
gcc-c++
|
|
end
|
|
|
|
CFLAGS += -fno-strict-aliasing
|
|
CFLAGS += -Wno-format
|
|
|
|
configure_options += \
|
|
--enable-compat185 \
|
|
--enable-cxx \
|
|
--disable-static
|
|
|
|
build
|
|
for version in %{versions}; do
|
|
cd %{DIR_SRC}/db-${version}/build_unix
|
|
../dist/configure \
|
|
%{configure_options}
|
|
|
|
%{MACRO_FIX_LIBTOOL}
|
|
|
|
make %{PARALLELISMFLAGS}
|
|
done
|
|
end
|
|
|
|
install
|
|
for version in %{versions}; do
|
|
cd %{DIR_SRC}/db-${version}/build_unix
|
|
make install DESTDIR=%{BUILDROOT} \
|
|
docdir=%{datadir}/doc/db-${version}
|
|
|
|
# Remove unversioned libs.
|
|
rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
|
|
|
|
# Move binaries.
|
|
tag=$(echo ${version} | cut -c1,3)
|
|
for bin in %{BUILDROOT}%{bindir}/*db_*; do
|
|
t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
|
|
mv -v ${bin} ${t}
|
|
done
|
|
|
|
# Move libs.
|
|
major=$(echo ${version} | cut -c1-3)
|
|
mkdir -pv %{BUILDROOT}%{libdir}/db${version}
|
|
pushd %{BUILDROOT}%{libdir}/db${version}
|
|
ln -svf ../libdb-${major}.so libdb.so
|
|
ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
|
|
popd
|
|
rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
|
|
|
|
# Move headers.
|
|
mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
|
|
mv -v %{BUILDROOT}%{includedir}/*.h \
|
|
%{BUILDROOT}%{includedir}/db-${version}/
|
|
ln -svf --relative \
|
|
%{BUILDROOT}%{includedir}/db-${version} \
|
|
%{BUILDROOT}%{includedir}/db-${major}
|
|
|
|
# Remove documentation.
|
|
rm -rf %{BUILDROOT}%{datadir}/doc
|
|
done
|
|
|
|
# Link latest headers into /usr/include
|
|
for file in %{BUILDROOT}%{includedir}/db-%{main_version}/*.h; do
|
|
ln -svf --relative ${file} %{BUILDROOT}%{includedir}/
|
|
done
|
|
end
|
|
end
|
|
|
|
packages
|
|
package %{name}
|
|
requires
|
|
compat-db53 = %{version_db53}-%{_release}
|
|
compat-db52 = %{version_db52}-%{_release}
|
|
compat-db48 = %{version_db48}-%{_release}
|
|
compat-db47 = %{version_db47}-%{_release}
|
|
compat-db46 = %{version_db46}-%{_release}
|
|
end
|
|
end
|
|
|
|
template COMPATDB
|
|
version = %{version_db%{version_tag}}
|
|
|
|
summary = The Berkeley DB database %{version} compatibility library.
|
|
description
|
|
The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
|
|
embedded database support for both traditional and client/server applications.
|
|
|
|
This package contains Berkeley DB library version %{version} used for compatibility.
|
|
end
|
|
|
|
files
|
|
%{bindir}/berkeley_db%{version_tag}_*
|
|
%{bindir}/db%{version_tag}_*
|
|
%{libdir}/db%{version}
|
|
%{libdir}/libdb*-%{version_major}.so
|
|
end
|
|
|
|
obsoletes
|
|
db4 < 1:%{version_major}
|
|
db4-devel < 1:%{version_major}
|
|
db4-cxx < 1:%{version_major}
|
|
db4-utils < 1:%{version_major}
|
|
|
|
libdb <= %{version_major}
|
|
end
|
|
|
|
conflicts
|
|
libdb = %{version_major}
|
|
end
|
|
end
|
|
|
|
package %{name}53
|
|
template COMPATDB
|
|
|
|
version_tag = 53
|
|
version_major = 5.3
|
|
end
|
|
|
|
package %{name}52
|
|
template COMPATDB
|
|
|
|
version_tag = 52
|
|
version_major = 5.2
|
|
end
|
|
|
|
package %{name}48
|
|
template COMPATDB
|
|
|
|
version_tag = 48
|
|
version_major = 4.8
|
|
end
|
|
|
|
package %{name}47
|
|
template COMPATDB
|
|
|
|
version_tag = 47
|
|
version_major = 4.7
|
|
end
|
|
|
|
package %{name}46
|
|
template COMPATDB
|
|
|
|
version_tag = 46
|
|
version_major = 4.6
|
|
end
|
|
|
|
package %{name}-headers
|
|
summary = The Berkeley DB database compatibility headers.
|
|
description
|
|
The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
|
|
embedded database support for both traditional and client/server applications.
|
|
|
|
This package contains Berkeley DB library headers used for compatibility.
|
|
end
|
|
|
|
files = %{includedir}
|
|
|
|
requires
|
|
compat-db = %{main_version}-%{_release}
|
|
end
|
|
|
|
provides
|
|
libdb-devel = %{version_db53}
|
|
libdb-devel = %{version_db52}
|
|
db4-devel = %{version_db48}
|
|
db4-devel = %{version_db47}
|
|
db4-devel = %{version_db46}
|
|
end
|
|
|
|
conflicts
|
|
libdb-devel
|
|
end
|
|
end
|
|
|
|
package %{name}-debuginfo
|
|
template DEBUGINFO
|
|
end
|
|
end
|