bdberl/c_src/buildlib.sh

29 lines
563 B
Bash
Raw Normal View History

2008-12-06 06:20:26 +00:00
#!/bin/sh
WORKDIR=`pwd`/system
TARGETDIR=`(cd .. && pwd)`/priv
DB_VER="4.7.25"
## 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}/build_unix && \
../dist/configure --prefix=$WORKDIR --disable-shared && make && ranlib libdb-*.a && make install) && \
rm -rf db-${DB_VER}