#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-vtun VERSION=3.0.2 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux echo "first we backup and delete your existing /etc/vtund.onf" if [ -e /etc/vtund.conf ]; then mv /etc/vtund.conf /etc/vtund.conf.backup rm -rf /etc/vtund.conf fi rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf vtun-$VERSION tar xzf $CWD/vtun-$VERSION.tar.gz cd vtun-$VERSION zcat $CWD/vtun-3.0.0-lzo2.patch.gz | patch -p1 --verbose || exit 1 ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --build=$TARGET || exit 1 make || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/vtun-$VERSION cp -a C* F* READ* TODO scripts $PKG/usr/doc/vtun-$VERSION ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) rm -rf $PKG/usr/man/man8/vtun.8 gzip -9 $PKG/usr/man/man?/* ( cd $PKG/usr/man/man8 ; ln -sf vtund.8.gz vtun.8.gz ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/vtun-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/vtun.build.log