#!/bin/sh # written by: Slackware-8.1-db3.SlackBuild(x86) # extremly modified by: Mario Stabrey for AlphaSlack CWD=`pwd` TMP=/tmp PKG=$TMP/package-db4 VERSION=4.3.29 ARCH=alpha BUILD=1 LIB=4.3 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf db-$VERSION tar xzf $CWD/db-$VERSION.tar.gz cd db-$VERSION zcat $CWD/patch.4.3.29.1.gz | patch -p0 -verbose || exit find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; cd build_unix ../dist/configure \ --prefix=/usr \ --enable-compat185 \ --enable-shared \ --enable-diagnostic \ --enable-rpc \ --enable-cxx \ --enable-tcl \ --with-tcl=/usr/lib \ --enable-test \ $TARGET || exit make -j2 || exit make DESTDIR=$PKG install || exit mkdir -p $PKG/lib $PKG/usr/include/db4 $PKG/usr/doc/db-$VERSION ( cd $PKG ( mv usr/docs/* usr/doc/db-$VERSION ) ( rm -rf $PKG/usr/doc/db-$VERSION/* $PKG/usr/docs ) ( cd usr/include ; mv *.h db4 ) ) cp -a ../LICENSE ../README $PKG/usr/doc/db-$VERSION cat << EOF > $PKG/usr/doc/db-$VERSION/README-DOCS For a ton of additional documentation (too large to include here) on writing source code that uses libdb4, please see the source tarball db-$VERSION.tar.bz2, which can be found in the AlphaSlack source tree in source/l/db4/, or on Sleepycat's web site: http://www.sleepycat.com. EOF ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded ) chown -R root:root $PKG/usr/doc/db-$VERSION chown -R root:bin $PKG/usr/bin # Make symlinks: ( cd $PKG ( cd usr/lib ; mv libdb-$LIB.so libdb_cxx-$LIB.so libdb_tcl-$LIB.so ../../lib ) ( cd usr/lib ; ln -sf ../../lib/libdb-$LIB.so libdb-$LIB.so ) ( cd usr/lib ; ln -sf ../../lib/libdb_cxx-$LIB.so libdb_cxx-$LIB.so ) ( cd usr/lib ; ln -sf ../../lib/libdb_tcl-$LIB.so libdb_tcl-$LIB.so ) ( cd lib ; ln -sf libdb-$LIB.so libdb.so ) ( cd lib ; ln -sf libdb-$LIB.so libdb-4.so ) ( cd lib ; ln -sf libdb-$LIB.so libdb4.so ) ( cd lib ; ln -sf libdb_cxx-$LIB.so libdb_cxx.so ) ( cd lib ; ln -sf libdb_cxx-$LIB.so libdb_cxx-4.so ) ( cd lib ; ln -sf libdb_tcl-$LIB.so libdb_tcl.so ) ( cd lib ; ln -sf libdb_tcl-$LIB.so libdb_tcl-4.so ) if [ -e usr/include/db4/db.h ]; then ( cd usr/include ; ln -sf db4/db.h db.h ; ln -sf db4/db_185.h db_185.h ; ln -sf db4/db_cxx.h db_cxx.h) fi if [ -e usr/lib/libdb-$LIB.a ]; then ( cd usr/lib ; ln -sf libdb-$LIB.a libdb.a ) ( cd usr/lib ; ln -sf libdb_cxx-$LIB.a libdb_cxx.a ) ( cd usr/lib ; ln -sf libdb_tcl-$LIB.a libdb_tcl.a ) ( cd usr/lib ; ln -sf libdb-$LIB.a libdb4.a ) ( cd usr/lib ; ln -sf libdb-$LIB.so libdb4.so ) fi ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/db4-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/db4.build.log