#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-genpower VERSION=1.0.3 ARCH=alpha BUILD=1 mkdir -p $PKG ( cd $TMP rm -rf genpower-$VERSION tar xzf $CWD/genpower-$VERSION-1.tar.gz cd genpower-$VERSION chown -R root.root . find . -perm 664 -exec chmod 644 {} \; zcat $CWD/genpower.var.diff.gz | patch -p1 -E make strip genpowerd gentest mkdir -p $PKG/sbin cat genpowerd > $PKG/sbin/genpowerd cat gentest > $PKG/sbin/gentest cat genpowerfail > $PKG/sbin/genpowerfail mkdir -p $PKG/etc cat genpowerd.conf > $PKG/etc/genpowerd.conf chown -R root.bin $PKG/sbin chmod 755 $PKG/sbin/* mkdir -p $PKG/usr/man/man8 cat genpowerd.8 | gzip -9c > $PKG/usr/man/man8/genpowerd.8.gz cat gentest.8 | gzip -9c > $PKG/usr/man/man8/gentest.8.gz mkdir -p $PKG/usr/doc/genpower-$VERSION cp -a COPYING Change.Log README TODO genpower.docs cables $PKG/usr/doc/genpower-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/genpower-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/genpower.build.log