#!/bin/sh -e
# script to automate building of 030_autotools patch file

upstream_version=002

rm -f debian/patches/030_autotools
dbs-edit-patch 030_autotools

#fakeroot debian/rules clean
#debian/rules stampdir/patch
#cd build-tree
#cp -a heimdal-$upstream_version heimdal-$upstream_version-old

cd $TMP/030_autotools/heimdal-cclub$upstream_version

aclocal -I cf
libtoolize -c -f
autoconf
autoheader
automake -a || true
# configure fails to call libtool properly - manually hack it so it works
# vim configure
#rm configure.bak
cd ..

#diff -ruN heimdal-$upstream_version-old heimdal-$upstream_version > ../debian/patches/030_autotools
#fakeroot debian/rules clean

sh -x ./dbs-update-patch
