#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi PKG=$TMP/package-popa3d rm -rf $PKG mkdir -p $PKG VERSION=0.6.4.1 ARCH=${ARCH:-i486} BUILD=1 cd $TMP rm -rf popa3d-$VERSION tar xzvf $CWD/popa3d-$VERSION.tar.gz cd popa3d-$VERSION chown -R root.root . zcat $CWD/popa3d.diff.gz | patch -p1 --verbose --backup --suffix=.orig make # already stripped mkdir -p $PKG/usr/sbin cat popa3d > $PKG/usr/sbin/popa3d chmod 755 $PKG/usr/sbin/popa3d chown -R root.bin $PKG/usr/sbin mkdir -p $PKG/usr/man/man8 cat popa3d.8 | gzip -9c > $PKG/usr/man/man8/popa3d.8.gz # Empty directory to chroot() into: mkdir -p $PKG/var/spool/pop # Docs: mkdir -p $PKG/usr/doc/popa3d-$VERSION cp -a \ CHANGES CONTACT DESIGN INSTALL LICENSE VIRTUAL \ $PKG/usr/doc/popa3d-$VERSION chmod 644 $PKG/usr/doc/popa3d-$VERSION/* # Add install script -- this ensures pop user/group are there: mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh # Description: cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/popa3d-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/popa3d-$VERSION rm -rf $PKG fi