--- debathena-hostinfo-10.0.0.orig/aclocal.m4
+++ debathena-hostinfo-10.0.0/aclocal.m4
@@ -194,7 +194,8 @@
 dnl ----- Kerberos 4 -----
 
 AC_DEFUN([ATHENA_KRB4_CHECK],
-[AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
+[AC_REQUIRE([AC_CANONICAL_TARGET])
+AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
 AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
 AC_CHECK_LIB(gen, compile)
 if test "$krb4" != yes; then
@@ -210,7 +211,12 @@
 			   [KRB4_LIBS="-lkrb -ldes"],
 			   [AC_MSG_ERROR(Kerberos 4 libraries not found)],
 			   -ldes)],
-	     -ldes425 -lkrb5 -lk5crypto -lcom_err)])
+	     -ldes425 -lkrb5 -lk5crypto -lcom_err)
+if test "$KRB4_LIBS" != "" ; then
+	case "$target_os" in
+	darwin*) KRB4_LIBS="$KRB4_LIBS -framework Kerberos"
+	esac
+fi])
 
 AC_DEFUN([ATHENA_KRB4],
 [AC_ARG_WITH(krb4,
@@ -236,7 +242,8 @@
 dnl ----- Kerberos 5 -----
 
 AC_DEFUN([ATHENA_KRB5_CHECK],
-[AC_SEARCH_LIBS(gethostbyname, nsl)
+[AC_REQUIRE([AC_CANONICAL_TARGET])
+AC_SEARCH_LIBS(gethostbyname, nsl)
 AC_SEARCH_LIBS(socket, socket)
 AC_CHECK_LIB(gen, compile)
 if test "$krb5" != yes; then
@@ -254,6 +261,11 @@
 if test "$krb5" != no; then
 	ATHENA_KRB5_CHECK
 	KRB5_LIBS="-lkrb5 -lk5crypto -lcom_err"
+	if test "$KRB5_LIBS" != "" ; then
+		case "$target_os" in
+		darwin*) KRB5_LIBS="$KRB5_LIBS -framework Kerberos"
+		esac
+	fi
 	AC_DEFINE(HAVE_KRB5)
 fi
 AC_SUBST(KRB5_LIBS)])
--- debathena-hostinfo-10.0.0.orig/debian/copyright
+++ debathena-hostinfo-10.0.0/debian/copyright
@@ -0,0 +1,18 @@
+The Athena source code was obtained from the Athena SVN repository at
+<svn://debathena.mit.edu/athena/trunk>, and is licensed as follows:
+
+  Copyright © 2008 by the Massachusetts Institute of Technology.
+
+  Permission to use, copy, modify, and distribute this software and
+  its documentation for any purpose and without fee is hereby granted,
+  provided that the above copyright notice appear in all copies and
+  that both that copyright notice and this permission notice appear in
+  supporting documentation, and that the name of M.I.T. not be used in
+  advertising or publicity pertaining to distribution of the software
+  without specific, written prior permission.  M.I.T. makes no
+  representations about the suitability of this software for any
+  purpose.  It is provided "as is" without express or implied
+  warranty.
+
+The Debian packaging is Copyright © 2008 Massachusetts Institute of
+Technology, and has the same license as the original software.
--- debathena-hostinfo-10.0.0.orig/debian/changelog
+++ debathena-hostinfo-10.0.0/debian/changelog
@@ -0,0 +1,15 @@
+debathena-hostinfo (10.0.0-0debathena2) unstable; urgency=low
+
+  * Change DEB_AUTO_UPDATE_AUTOCONF to 2.50, not 1.
+  * Remove DEB_AUTO_UPDATE_DEBIAN_CONTROL.
+  * Change "Debian-Athena Project" to "Debathena Project".
+  * Remove debian/control from version control.
+  * Clean up debian/copyright.
+
+ -- Tim Abbott <tabbott@mit.edu>  Sat, 24 Jan 2009 19:34:50 -0500
+
+debathena-hostinfo (10.0.0-0debathena1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Robert Basch <rbasch@mit.edu>  Sat, 10 May 2008 13:00:03 -0400
--- debathena-hostinfo-10.0.0.orig/debian/compat
+++ debathena-hostinfo-10.0.0/debian/compat
@@ -0,0 +1 @@
+4
--- debathena-hostinfo-10.0.0.orig/debian/rules
+++ debathena-hostinfo-10.0.0/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+DEB_AUTO_UPDATE_AUTOCONF = 2.50
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+clean::
+	rm -f configure
--- debathena-hostinfo-10.0.0.orig/debian/control
+++ debathena-hostinfo-10.0.0/debian/control
@@ -0,0 +1,14 @@
+Source: debathena-hostinfo
+Section: debathena/net
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 4.2.0), autoconf
+Standards-Version: 3.7.2
+
+Package: debathena-hostinfo
+Architecture: all
+Provides: hostinfo
+Depends: ${misc:Depends}, bind9-host
+Description: A utility to ask an Internet nameserver for host information
+ The hostinfo utility fetches the Domain Name System records for the
+ specified host name and prints them.
--- debathena-hostinfo-10.0.0.orig/debian/control.in
+++ debathena-hostinfo-10.0.0/debian/control.in
@@ -0,0 +1,14 @@
+Source: debathena-hostinfo
+Section: debathena/net
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: @cdbs@
+Standards-Version: 3.7.2
+
+Package: debathena-hostinfo
+Architecture: all
+Provides: hostinfo
+Depends: ${misc:Depends}, bind9-host
+Description: A utility to ask an Internet nameserver for host information
+ The hostinfo utility fetches the Domain Name System records for the
+ specified host name and prints them.
