#!/bin/bash

source /usr/share/slackdev/buildkit.sh
export PACKAGE=minicom
export PKGSERIES=a
export VERSION=2.1
export BUILD=2
export ARCH=arm
export SLACKPACKAGE=$PACKAGE-$VERSION-$ARCH-$BUILD.tgz

# Remove existing autoconf so that it's re-added and fixed up 
# below.  I have problems with autoconf on a devbox that I haven't
# reinstalled for a while.  This just saves me forgetting:
removepkg autoconf autoconf2.13

# Ensure base ARM packages are installed first (this'll reinstall d/autoconf):
slackbasedeps

# Ensure additional dependencies:
slackcheckpkgdeps ncurses      || installpkg $PKGSTORE/l/ncurses-*tgz
# minicom has some non-2.5.x-compatible configure scripts:
slackcheckpkgdeps autoconf2.13 || installpkg $PKGSTORE/../unsupported-extra/packages/autoconf2.13-*tgz
slackcheckpkgdeps ncurses,autoconf2.13 || exit 99

# Launch the package build script:
( ./$PACKAGE.SlackBuild ) 2>&1 | tee build.log

# Now remove the autoconf packages - I don't want autoconf2.13 lying around
# and autoconf-2.5x needs to be reinstalled to become the operational version:
removepkg autoconf autoconf2.13
