#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-at 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 # Explode the package framework: cd $PKG explodepkg $CWD/_at.tar.gz echo "+==========+" echo "| at-3.1.8 |" echo "+==========+" cd $TMP tar xzvf $CWD/at_3.1.8.orig.tar.gz cd at-3.1.8.orig # Pre-shipped crud: rm y.tab.c y.tab.h lex.yy.c zcat $CWD/at_3.1.8-10.2.diff.gz | patch -p1 --backup --verbose -E mkdir -p $PKG/usr/doc/at-3.1.8 cp -a COPYING ChangeLog Copyright Problems README timespec \ $PKG/usr/doc/at-3.1.8 chown root.root $PKG/usr/doc/at-3.1.8/* chmod 644 $PKG/usr/doc/at-3.1.8/* ./configure sparc-slackware-linux make strip at atd cat at > $PKG/usr/bin/at cat atrun > $PKG/usr/sbin/atrun cat atd > $PKG/usr/sbin/atd cat batch > $PKG/usr/bin/batch cat at.1 | gzip -9c > $PKG/usr/man/man1/at.1.gz cat atrun.8 | gzip -9c > $PKG/usr/man/man8/atrun.8.gz cat atd.8 | gzip -9c > $PKG/usr/man/man8/atd.8.gz # Build the package: cd $PKG echo "n" | makepkg $TMP/at.tgz # Warn of zero-length files: for file in `find . -type f -print` ; do if [ "`filesize $file`" = "0" ]; then echo "WARNING: zero length file $file" fi if [ "`filesize $file`" = "20" ]; then echo "WARNING: possible empty gzipped file $file" fi done # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/at-3.1.8 rm -rf $PKG fi