smlinux/base/db/db.SMBuild

55 lines
1.3 KiB
Text
Executable file

app=db
version=6.2.23
build=1sml
homepage="https://www.oracle.com/database/technologies/related/berkeleydb.html"
download="http://download.oracle.com/berkeley-db/db-$version.tar.gz"
desc="Berkeley embedded database library"
requires="gcc-libs"
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
if [ "$arch" = "aarch64" ]; then
db_atomic=gcc-builtin
else
db_atomic=x86/gcc-assembly
fi
applypatch $srcdir/bdb-configure.patch
cd build_unix
CFLAGS="-D_GNU_SOURCE" \
db_cv_clock_monotonic=yes \
db_cv_build_sequence=yes \
db_cv_mmap_extend=yes \
db_cv_atomic="$db_atomic" \
../dist/configure \
--prefix="" \
--libdir=/lib \
--sysconfdir=/etc \
--enable-shared \
--disable-static \
--enable-dbm \
--enable-cxx
sed -i 's/^install_docs:/install_docs:\n\ttrue\ninstall_crap:/' Makefile
make
make install DESTDIR=$pkg
cd ..
cp LICENSE $pkgdocs/
mkfinalpkg
}
sha512sums="
beb17661a44a4bb3feb3e95d6670599087fe38dd604f3902f90bf0336dc1d823adc7f56be854a55caa995f1503681896842ecfcd3dd668e47370c624255bd4ee db-6.2.23.tar.lz
8a91a6ff079792bf36efc11302140eef857019ab8e66058e39ea8b9a81dc2b4837fe2941b380343cf74e219d800eba2a08194d5b76fb48afc9cf0a599f1bf919 bdb-configure.patch
"