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
|
|
|
|
|
|
|
## Check for necessary tarball
|
2011-11-28 17:37:59 +00:00
|
|
|
if [ ! -f "db-${BDB_VERSION}.tar.gz" ]; then
|
2008-12-06 06:20:26 +00:00
|
|
|
echo "Could not find db tarball. Aborting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
## Make sure target directory exists
|
|
|
|
mkdir -p $TARGETDIR
|
|
|
|
|
|
|
|
## Remove existing directories
|
2011-11-28 17:37:59 +00:00
|
|
|
rm -rf system db-${BDB_VERSION}
|
2008-12-06 06:20:26 +00:00
|
|
|
|
|
|
|
## Untar and build everything
|
2011-11-28 17:37:59 +00:00
|
|
|
tar -xzf db-${BDB_VERSION}.tar.gz && \
|
|
|
|
##(cd db-${BDB_VERSION} && patch -p0 < ../bdb-align.patch ) && \
|
|
|
|
(cd db-${BDB_VERSION}/build_unix && \
|
2011-07-18 15:43:56 +00:00
|
|
|
../dist/configure --prefix=$WORKDIR --disable-shared && make && ranlib libdb-*.a && make install) && \
|
2011-11-28 17:37:59 +00:00
|
|
|
rm -rf db-${BDB_VERSION}
|
2008-12-06 06:20:26 +00:00
|
|
|
|