#!/bin/sh # written by: Slackware-8.1-db3.SlackBuild(x86) # extremly modified by: Mario Stabrey for Alpha CWD=`pwd` TMP=/tmp PKG=$TMP/package-db4 VERSION=4.3.21 ARCH=alpha BUILD=1 LIB=4.3 TARGET=$ARCH-alphaslack-linux mkdir -p $PKG ( cd $TMP tar xzf $CWD/db-$VERSION.tar.gz cd db-$VERSION 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 CFLAGS=-O3 ../dist/configure \ --prefix=/usr \ --enable-compat185 \ --enable-shared \ --enable-diagnostic \ --enable-rpc \ --enable-cxx \ --enable-tcl \ --with-tcl=/usr/lib \ --enable-test \ $TARGET make make DESTDIR=$PKG install mkdir -p $PKG/lib $PKG/usr/include/db4 $PKG/usr/doc/db-$VERSION 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 Slackware source tree in source/l/db4/, or on Sleepycat's web site: http://www.sleepycat.com. EOF ( cd $PKG ( mv usr/docs/* usr/doc/db-$VERSION ) ( rm -rf usr/docs ) ( cd usr/include ; mv *.h db4 ) ) ( 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 ) cp -a ../LICENSE $PKG/usr/doc/db-$VERSION 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_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 ) 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