bdberl/c_src/buildlib.sh

36 lines
783 B
Bash
Raw Normal View History

2011-07-18 07:50:39 +00:00
#!/bin/bash
2008-12-06 06:20:26 +00:00
2011-07-17 19:55:48 +00:00
if [ `basename $PWD` != "c_src" ]; then
pushd c_src
fi
BASEDIR="$PWD"
WORKDIR=$BASEDIR/system
TARGETDIR=$BASEDIR/../priv
2008-12-06 06:20:26 +00:00
2011-07-17 19:55:48 +00:00
DB_VER="5.1.25"
2008-12-06 06:20:26 +00:00
## Check for necessary tarball
if [ ! -f "db-${DB_VER}.tar.gz" ]; then
echo "Could not find db tarball. Aborting..."
exit 1
fi
## Make sure target directory exists
mkdir -p $TARGETDIR
## Remove existing directories
rm -rf system db-${DB_VER}
## Untar and build everything
tar -xzf db-${DB_VER}.tar.gz && \
##(cd db-${DB_VER} && patch -p0 < ../bdb-align.patch ) && \
2008-12-06 06:20:26 +00:00
(cd db-${DB_VER}/build_unix && \
../dist/configure --prefix=$WORKDIR --enable-diagnostic --enable-debug --disable-shared --enable-perfmon-statistics --enable-dtrace && make && ranlib libdb-*.a && make install) && \
rm -rf db-${DB_VER}
2008-12-06 06:20:26 +00:00