#!/bin/sh
# Set initial variables:
CWD=`pwd`
VERSION=2.59
ARCH=alpha
BUILD=1
TMP=/tmp
PKG=$TMP/package-autoconf

mkdir -p $PKG
( cd $TMP
rm -rf autoconf-$VERSION
tar xjf $CWD/autoconf-$VERSION.tar.bz2
cd autoconf-$VERSION
chown -R root.root .
find . -perm 444 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 666 -exec chmod 644 {} \;
./configure --prefix=/usr
make
make install DESTDIR=$PKG
chown -R root.bin $PKG/usr/bin
gzip -9 $PKG/usr/man/man1/* $PKG/usr/info/*.info
rm -rf $PKG/usr/info/dir
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/autoconf-$VERSION-$ARCH-$BUILD.tgz
) 2>&1 | tee $TMP/autoconf.build.log
