--- debathena-bugme-10.0.1.orig/bugme.xsession
+++ debathena-bugme-10.0.1/bugme.xsession
@@ -1,9 +1,3 @@
-: ${FORCE_QUICKSTATION=0}
-
-# Use IGNORECASE to make the match case insensitive
-# Use ret to set a default exit code, and then override it if there's
-# a match
-awk -v IGNORECASE=1 -v host="$(hostname --fqdn)" -v ret=1 '$0 == host { ret=0 } END { exit ret }' /afs/athena.mit.edu/system/config/quick/quickstations
-if [ $? -eq 0 -o $FORCE_QUICKSTATION -eq 1 ] && [ -x /usr/bin/bugme ]; then
+if [ "$(machtype -q)" = "quickstation" ] && [ -x /usr/bin/bugme ]; then
     STARTUP="/usr/bin/bugme $STARTUP"
 fi
--- debathena-bugme-10.0.1.orig/aclocal.m4
+++ debathena-bugme-10.0.1/aclocal.m4
@@ -79,8 +79,8 @@
 		CPPFLAGS="$CPPFLAGS -I$com_err/include"
 		LDFLAGS="$LDFLAGS -L$com_err/lib"
 	fi
-	AC_CHECK_LIB(com_err, com_err, ,
-		     [AC_MSG_ERROR(com_err library not found)])
+	AC_SEARCH_LIBS(com_err, com_err, ,
+		       [AC_MSG_ERROR(com_err library not found)])
 else
 	AC_MSG_ERROR(This package requires com_err.)
 fi])
@@ -96,10 +96,10 @@
 		CPPFLAGS="$CPPFLAGS -I$ss/include"
 		LDFLAGS="$LDFLAGS -L$ss/lib"
 	fi
-	AC_CHECK_LIB(curses, initscr)
-	AC_CHECK_LIB(readline, readline)
-	AC_CHECK_LIB(ss, ss_perror, ,
-		     [AC_MSG_ERROR(ss library not found)], -lcom_err)
+	AC_SEARCH_LIBS(initscr, curses)
+	AC_SEARCH_LIBS(readline, readline)
+	AC_SEARCH_LIBS(ss_perror, ss, ,
+		       [AC_MSG_ERROR(ss library not found)], -lcom_err)
 else
 	AC_MSG_ERROR(This package requires ss.)
 fi])
@@ -115,8 +115,8 @@
 		CPPFLAGS="$CPPFLAGS -I$regex/include"
 		LDFLAGS="$LDFLAGS -L$regex/lib"
 	fi
-	AC_CHECK_LIB(regex, regcomp, REGEX_LIBS=-lregex,
-		     [AC_MSG_ERROR(regex library not found)])
+	AC_SEARCH_LIBS(regcomp, regex, REGEX_LIBS=-lregex,
+		       [AC_MSG_ERROR(regex library not found)])
 else
 	AC_CHECK_FUNC(regcomp, :,
 		      [AC_MSG_ERROR(can't find POSIX regexp support)])
@@ -130,7 +130,7 @@
 	CPPFLAGS="$CPPFLAGS -I$motif/include"
 	LDFLAGS="$LDFLAGS -L$motif/lib"
 fi
-AC_CHECK_LIB(Xm, XmStringFree, :, [AC_MSG_ERROR(Motif library not found)])])
+AC_SEARCH_LIBS(XmStringFree, Xm, :, [AC_MSG_ERROR(Motif library not found)])])
 
 AC_DEFUN([ATHENA_MOTIF],
 [AC_ARG_WITH(motif,
@@ -156,16 +156,16 @@
 dnl ----- AFS -----
 
 AC_DEFUN([ATHENA_AFS_CHECK],
-[AC_CHECK_FUNC(insque, :, AC_CHECK_LIB(compat, insque))
-AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
-AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
-AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
+[AC_SEARCH_LIBS(insque, compat)
+AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SEARCH_LIBS(socket, socket)
+AC_SEARCH_LIBS(res_send, resolv)
 if test "$afs" != yes; then
 	CPPFLAGS="$CPPFLAGS -I$afs/include"
 	LDFLAGS="$LDFLAGS -L$afs/lib -L$afs/lib/afs"
 fi
-AC_CHECK_LIB(sys, pioctl, :, [AC_MSG_ERROR(AFS libraries not found)],
-	     -lrx -llwp -lsys -lafsutil)
+AC_SEARCH_LIBS(pioctl, sys, :, [AC_MSG_ERROR(AFS libraries not found)],
+	       -lrx -llwp -lsys -lafsutil)
 AFS_DIR=$afs
 AC_SUBST(AFS_DIR)])
 
@@ -195,9 +195,9 @@
 
 AC_DEFUN([ATHENA_KRB4_CHECK],
 [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)
+AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SEARCH_LIBS(socket, socket)
+AC_SEARCH_LIBS(compile, gen)
 if test "$krb4" != yes; then
 	CPPFLAGS="$CPPFLAGS -I$krb4/include"
 	if test -d "$krb4/include/kerberosIV"; then
@@ -250,14 +250,14 @@
 [AC_REQUIRE([AC_CANONICAL_TARGET])
 AC_SEARCH_LIBS(gethostbyname, nsl)
 AC_SEARCH_LIBS(socket, socket)
-AC_CHECK_LIB(gen, compile)
+AC_SEARCH_LIBS(compile, gen)
 if test "$krb5" != yes; then
 	CPPFLAGS="$CPPFLAGS -I$krb5/include"
 	LDFLAGS="$LDFLAGS -L$krb5/lib"
 fi
-AC_CHECK_LIB(krb5, krb5_init_context, :,
-	     [AC_MSG_ERROR(Kerberos 5 libraries not found)],
-	     -lk5crypto -lcom_err)])
+AC_SEARCH_LIBS(krb5_init_context, krb5, :,
+	       [AC_MSG_ERROR(Kerberos 5 libraries not found)],
+	       -lk5crypto -lcom_err)])
 
 AC_DEFUN([ATHENA_KRB5],
 [AC_ARG_WITH(krb5,
@@ -288,13 +288,13 @@
 dnl ----- Hesiod -----
 
 AC_DEFUN([ATHENA_HESIOD_CHECK],
-[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
+[AC_SEARCH_LIBS(res_send, resolv)
 if test "$hesiod" != yes; then
 	CPPFLAGS="$CPPFLAGS -I$hesiod/include"
 	LDFLAGS="$LDFLAGS -L$hesiod/lib"
 fi
-AC_CHECK_LIB(hesiod, hes_resolve, :,
-	     [AC_MSG_ERROR(Hesiod library not found)])])
+AC_SEARCH_LIBS(hes_resolve, hesiod, :,
+	       [AC_MSG_ERROR(Hesiod library not found)])])
 
 AC_DEFUN([ATHENA_HESIOD],
 [AC_ARG_WITH(hesiod,
@@ -320,12 +320,12 @@
 dnl ----- libares -----
 
 AC_DEFUN([ATHENA_ARES_CHECK],
-[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
+[AC_SEARCH_LIBS(res_send, resolv)
 if test "$ares" != yes; then
 	CPPFLAGS="$CPPFLAGS -I$ares/include"
 	LDFLAGS="$LDFLAGS -L$ares/lib"
 fi
-AC_CHECK_LIB(ares, ares_init, :, [AC_MSG_ERROR(libares not found)])])
+AC_SEARCH_LIBS(ares_init, ares, :, [AC_MSG_ERROR(libares not found)])])
 
 AC_DEFUN([ATHENA_ARES],
 [AC_ARG_WITH(ares,
@@ -354,7 +354,7 @@
 	CPPFLAGS="$CPPFLAGS -I$zephyr/include"
 	LDFLAGS="$LDFLAGS -L$zephyr/lib"
 fi
-AC_CHECK_LIB(zephyr, ZFreeNotice, :, [AC_MSG_ERROR(zephyr not found)])])
+AC_SEARCH_LIBS(ZFreeNotice, zephyr, :, [AC_MSG_ERROR(zephyr not found)])])
 
 AC_DEFUN([ATHENA_ZEPHYR],
 [AC_ARG_WITH(zephyr,
--- debathena-bugme-10.0.1.orig/debian/control
+++ debathena-bugme-10.0.1/debian/control
@@ -0,0 +1,15 @@
+Source: debathena-bugme
+Section: debathena/base
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 4.2.0)
+Standards-Version: 3.8.0
+
+Package: debathena-bugme
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-gtk2, python-glade2, debathena-machtype (>= 10.0.2-0debathena1~)
+Description: Display a timer for Athena Quickstations
+ Athena quickstations are designed for short-term login sessions.  This
+ time limit is enforced by a timer in the top left corner of the workstation
+ which displays the elapsed time of the login session and warns users when
+ they have exceeded the time limit.
--- debathena-bugme-10.0.1.orig/debian/compat
+++ debathena-bugme-10.0.1/debian/compat
@@ -0,0 +1 @@
+4
--- debathena-bugme-10.0.1.orig/debian/control.in
+++ debathena-bugme-10.0.1/debian/control.in
@@ -0,0 +1,15 @@
+Source: debathena-bugme
+Section: debathena/base
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: @cdbs@
+Standards-Version: 3.8.0
+
+Package: debathena-bugme
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-gtk2, python-glade2, debathena-machtype (>= 10.0.2-0debathena1~)
+Description: Display a timer for Athena Quickstations
+ Athena quickstations are designed for short-term login sessions.  This
+ time limit is enforced by a timer in the top left corner of the workstation
+ which displays the elapsed time of the login session and warns users when
+ they have exceeded the time limit.
--- debathena-bugme-10.0.1.orig/debian/changelog
+++ debathena-bugme-10.0.1/debian/changelog
@@ -0,0 +1,23 @@
+debathena-bugme (10.0.1-0debathena2) unstable; urgency=low
+
+  * Use machtype -q to determine if a workstation is a quickstation.
+
+ -- Evan Broder <broder@mit.edu>  Mon, 05 Oct 2009 15:55:48 -0400
+
+debathena-bugme (10.0.1-0debathena1) unstable; urgency=low
+
+  * Add a handler for timer window visibility events, to raise the
+    window when it has been obscured (e.g. by Nautilus when it takes
+    over the desktop). (Trac: #324)
+  * Change the timer window from a popup to a normal toplevel window,
+    but disallowing input focus, so that it does not obscure menu
+    items.
+
+ -- Robert Basch <rbasch@mit.edu>  Thu, 13 Aug 2009 14:31:22 -0400
+
+debathena-bugme (10.0.0-0debathena1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 25 Mar 2009 11:23:10 -0400
+
--- debathena-bugme-10.0.1.orig/debian/copyright
+++ debathena-bugme-10.0.1/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-bugme-10.0.1.orig/debian/rules
+++ debathena-bugme-10.0.1/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
+
+DEB_MAKE_INSTALL_TARGET += install DESTDIR=$(DEB_DESTDIR)
