#!/bin/sh VERSION=5.43 TCL=8.4.11 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} set -e PKG=/tmp/package-expect rm -rf "$PKG" CWD=`pwd` LIBDIR=lib if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mtune=athlon-xp" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=athlon-xp" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIR=lib64 fi export CFLAGS="$SLKCFLAGS" # We need includes from this: cd /tmp rm -rf tcl$TCL tar xzvf $CWD/tcl$TCL-src.tar.gz cd tcl$TCL/unix ./configure --prefix=/usr --libdir=/usr/$LIBDIR ## Build and install static version: #( cd /tmp #tar xzvf $CWD/expect-$VERSION.tar.gz #cd expect-$VERSION #./configure --prefix=/usr --with-tclconfig=/usr/lib \ # --with-tclinclude=/tmp/tcl$TCL/generic #make #make install ) #mv /tmp/expect-$VERSION /tmp/expect-$VERSION-static # Build and install shared version: cd /tmp rm -rf expect-$VERSION tar xzvf $CWD/expect-${VERSION}.0.tar.gz cd expect-$VERSION LDFLAGS="-L$PKG/usr/$LIBDIR" \ ./configure --prefix=/usr --with-tclconfig=/usr/$LIBDIR \ --with-tclinclude=/tmp/tcl$TCL/generic --enable-shared \ --libdir=/usr/$LIBDIR make make INSTALL_ROOT=$PKG install mkdir -p $PKG/usr/doc/expect-$VERSION cp -a \ FAQ HISTORY INSTALL NEWS README example \ $PKG/usr/doc/expect-$VERSION cd $PKG/usr/$LIBDIR strip -g *.so *.a */*.a strip $PKG/usr/bin/expect* rm -rf libexpect.a ln -sf libexpect${VERSION}.a libexpect.a rm -rf libexpect.so ln -sf libexpect${VERSION}.so libexpect.so if [ "$LIBDIR" != "lib" ]; then rm -rf $PKG/usr/lib fi gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd "$PKG" makepkg -c y -l y ../expect-$VERSION-$ARCH-$BUILD.tgz