--- debathena-authwatch-10.0.0.orig/aclocal.m4
+++ debathena-authwatch-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-authwatch-10.0.0.orig/debian/copyright
+++ debathena-authwatch-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-authwatch-10.0.0.orig/debian/changelog
+++ debathena-authwatch-10.0.0/debian/changelog
@@ -0,0 +1,38 @@
+debathena-authwatch (10.0.0-0debathena4) unstable; urgency=low
+
+  * 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:33:57 -0500
+
+debathena-authwatch (10.0.0-0debathena3) unstable; urgency=low
+
+  * Fix depends/recommends editing error in control.in.
+
+ -- Greg Hudson <ghudson@mit.edu>  Thu, 19 Jun 2008 23:14:08 -0400
+
+debathena-authwatch (10.0.0-0debathena2) unstable; urgency=low
+
+  * Recommend grenew since we tell users to run it.
+
+ -- Greg Hudson <ghudson@mit.edu>  Thu, 19 Jun 2008 16:46:27 -0400
+
+debathena-authwatch (10.0.0-0debathena1) unstable; urgency=low
+
+  * Refer to the correct grenew menu item for Athena 10.
+
+ -- Greg Hudson <ghudson@mit.edu>  Thu, 19 Jun 2008 16:44:48 -0400
+
+debathena-authwatch (9.4.12-0debathena2) unstable; urgency=low
+
+  * Specify libgtk2.0-dev and pkg-config in build-depends.
+
+ -- Greg Hudson <ghudson@mit.edu>  Tue, 19 Feb 2008 15:29:24 -0500
+
+debathena-authwatch (9.4.12-0debathena1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Tim Abbott <tabbott@mit.edu>  Wed,  6 Feb 2008 19:02:44 -0500
--- debathena-authwatch-10.0.0.orig/debian/compat
+++ debathena-authwatch-10.0.0/debian/compat
@@ -0,0 +1 @@
+4
--- debathena-authwatch-10.0.0.orig/debian/rules
+++ debathena-authwatch-10.0.0/debian/rules
@@ -0,0 +1,10 @@
+#!/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
+
+DEB_CONFIGURE_EXTRA_FLAGS += --with-krb5
+
+clean::
+	rm -f configure
--- debathena-authwatch-10.0.0.orig/debian/control
+++ debathena-authwatch-10.0.0/debian/control
@@ -0,0 +1,14 @@
+Source: debathena-authwatch
+Section: debathena/gnome
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 4.2.0), autoconf, libkrb5-dev, libgtk2.0-dev, pkg-config
+Standards-Version: 3.7.2
+
+Package: debathena-authwatch
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: debathena-grenew
+Description: Warn user of expiring authentication
+ This program runs in the background and warns the user if their
+ Kerberos authentication is about to expire.
--- debathena-authwatch-10.0.0.orig/debian/control.in
+++ debathena-authwatch-10.0.0/debian/control.in
@@ -0,0 +1,14 @@
+Source: debathena-authwatch
+Section: debathena/gnome
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: @cdbs@, libkrb5-dev, libgtk2.0-dev, pkg-config
+Standards-Version: 3.7.2
+
+Package: debathena-authwatch
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: debathena-grenew
+Description: Warn user of expiring authentication
+ This program runs in the background and warns the user if their
+ Kerberos authentication is about to expire.
