#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-joe VERSION=3.1 ARCH=${ARCH:-i486} BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf joe-$VERSION tar xzvf $CWD/joe-$VERSION.tar.gz cd joe-$VERSION chown -R root.root . ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --program-prefix="" \ --program-suffix="" \ $ARCH-slackware-linux make make install DESTDIR=$PKG chown -R root.bin $PKG/usr/bin ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) gzip -9 $PKG/usr/man/man?/* mkdir -p $PKG/usr/doc/joe-$VERSION cp -a \ COPYING HINTS INFO LIST NEWS README* TODO docs/help-system.html \ $PKG/usr/doc/joe-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/joe-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/joe-$VERSION rm -rf $PKG fi