#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-bc INFO=$PKG/usr/info if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi BUILD=2 # Explode the package framework: cd $PKG explodepkg $CWD/_bc.tar.gz echo "+=========+" echo "| bc-1.06 |" echo "+=========+" cd $TMP tar xzvf $CWD/bc-1.06.tar.gz cd bc-1.06 zcat $CWD/bc-1.06.readline.diff.gz | patch -p1 --verbose --backup --suffix=.orig CFLAGS="-O2 -march=i386 -mcpu=i686" ./configure --prefix=/usr --with-readline make strip bc/bc dc/dc cat bc/bc > $PKG/usr/bin/bc cat dc/dc > $PKG/usr/bin/dc cd doc for page in bc.1 dc.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done mkdir -p $INFO cat dc.info | gzip -9c > $INFO/dc.info.gz cd .. mkdir -p $PKG/usr/doc/bc-1.06 cp -a AUTHORS COPYING ChangeLog Examples INSTALL NEWS README Test \ $PKG/usr/doc/bc-1.06 chown -R root.root $PKG/usr/doc/bc-1.06 mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/bc-1.06-i386-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/bc-1.06 rm -rf $PKG fi