#!/bin/sh -e

echo "This program will attempt to download djbdns source"
echo "automatically.  If the source cannot be downloaded"
echo "at this time, installation will abort."
echo ""
echo "If installation fails at this time, you can attempt"
echo "to download djbdns at a later time by running"
echo ""
echo "         get-djbdns"

if [ -e /usr/src/djbdns-installer/djbdns_1.05.orig.tar.gz ]; then
	SUM=`md5sum < /usr/src/djbdns-installer/djbdns_1.05.orig.tar.gz | awk '{print $1}'`
fi

if [ "$SUM" != "3147c5cd56832aa3b41955c7a51cbeb2" ]; then
	get-djbdns
else
	echo ""
	echo "Looks like the djbdns source is already on your system!"
fi

echo ""
echo "To build djbdns binary package, you have to run"
echo ""
echo "         build-djbdns"
echo ""

#DEBHELPER#

exit 0
