#!/bin/sh # All comments and suggestions to Alak Trakru # CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-putty SRCDIR=$TMP/putty-src VERSION=0.53cvs ARCH=i386 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG $SRCDIR mkdir -p $PKG $SRCDIR mkdir -p $PKG/usr/bin $PKG/usr/man/man1 cd $SRCDIR unzip -L $CWD/putty-src.zip cd unix cat $CWD/makefile.gtk > $SRCDIR/unix/Makefile # CFLAGS="-O2 -march=i386 -mcpu=i686" make cp pterm plink putty puttytel $PKG/usr/bin cp plink.1 pterm.1 putty.1 puttytel.1 $PKG/usr/man/man1 mkdir -p $PKG/usr/doc/putty-$VERSION cp -a ../readme ../readme.txt ../website.url \ $PKG/usr/doc/putty-$VERSION chmod 644 $PKG/usr/doc/putty-$VERSION/* chown root.root $PKG/usr/doc/putty-$VERSION/* find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/putty-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $SRCDIR rm -rf $PKG fi