#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-newspost VERSION=2.1.1 ARCH=i486 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG # place for the package to be built # Explode the package framework: cd $PKG explodepkg $CWD/_newspost.tar.gz cd $TMP rm -rf newspost-$VERSION tar xzvf $CWD/newspost-$VERSION.tar.gz cd newspost-$VERSION chown -R root.root . make mkdir -p $PKG/usr/bin strip newspost cat newspost > $PKG/usr/bin/newspost chown -R root.bin $PKG/usr/bin chmod 755 $PKG/usr/bin/newspost mkdir -p $PKG/usr/man/man1 cat man/man1/newspost.1 | gzip -9c > $PKG/usr/man/man1/newspost.1.gz mkdir -p $PKG/usr/doc/newspost-$VERSION cp -a \ CHANGES COPYING README \ $PKG/usr/doc/newspost-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/newspost-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/newspost-$VERSION rm -rf $PKG fi