--- debathena-moira-4.0.0+cvs20080830.orig/debian/control
+++ debathena-moira-4.0.0+cvs20080830/debian/control
@@ -0,0 +1,39 @@
+Source: debathena-moira
+Section: debathena/net
+Priority: extra
+Maintainer: Debian-Athena Project <debathena@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 4.2.0), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), comerr-dev, libkrb5-dev, libhesiod-dev, libzephyr-dev, libzephyr3-krb, libreadline-dev, libncurses-dev
+Standards-Version: 3.7.2
+
+Package: debathena-moira-clients
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Clients for the Moira database
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains clients such as moira, stella, blanche, etc.
+
+Package: debathena-moira-update-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Athena update_server
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the update_server daemon, which is used for
+ servers that automatically receive information dumps from moira.
+
+Package: debathena-libmoira-dev
+Section: debathena/libdevel
+Architecture: any
+Provides: libmoira-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, comerr-dev, libkrb5-dev, libhesiod-dev, libzephyr-dev, libzephyr3-krb
+Description: Development files for Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
--- debathena-moira-4.0.0+cvs20080830.orig/debian/compat
+++ debathena-moira-4.0.0+cvs20080830/debian/compat
@@ -0,0 +1 @@
+4
--- debathena-moira-4.0.0+cvs20080830.orig/debian/control.in
+++ debathena-moira-4.0.0+cvs20080830/debian/control.in
@@ -0,0 +1,39 @@
+Source: debathena-moira
+Section: debathena/net
+Priority: extra
+Maintainer: Debian-Athena Project <debathena@mit.edu>
+Build-Depends: @cdbs@, comerr-dev, libkrb5-dev, libhesiod-dev, libzephyr-dev, libzephyr3-krb, libreadline-dev, libncurses-dev
+Standards-Version: 3.7.2
+
+Package: debathena-moira-clients
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Clients for the Moira database
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains clients such as moira, stella, blanche, etc.
+
+Package: debathena-moira-update-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Athena update_server
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the update_server daemon, which is used for
+ servers that automatically receive information dumps from moira.
+
+Package: debathena-libmoira-dev
+Section: debathena/libdevel
+Architecture: any
+Provides: libmoira-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, comerr-dev, libkrb5-dev, libhesiod-dev, libzephyr-dev, libzephyr3-krb
+Description: Development files for Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
--- debathena-moira-4.0.0+cvs20080830.orig/debian/changelog
+++ debathena-moira-4.0.0+cvs20080830/debian/changelog
@@ -0,0 +1,53 @@
+debathena-moira (4.0.0+cvs20080830-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot
+  * Add a debathena-moira-update-server package that installs
+    update_server
+
+ -- Evan Broder <broder@mit.edu>  Fri, 01 Aug 2008 10:54:26 -0400
+
+debathena-moira (4.0.0+cvs20080701-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot
+  * Move Moira header files from /usr/share/include to /usr/include/moira
+
+ -- Evan Broder <broder@mit.edu>  Tue, 01 Jul 2008 20:38:13 -0400
+
+debathena-moira (4.0.0+cvs20080304-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot to fix chsh.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 04 Mar 2008 15:50:31 -0500
+
+debathena-moira (4.0.0+cvs20080301-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Remove mrtest segfault patch from last release (fixed in upstream)
+
+ -- Tim Abbott <tabbott@mit.edu>  Sat,  1 Mar 2008 18:51:40 -0500
+
+debathena-moira (4.0.0+cvs20070817-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Patch an mrtest segfault with too many command line arguments.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Fri, 24 Aug 2007 19:53:49 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena3) unstable; urgency=low
+
+  * Move chsh.debathena to chsh.moira and chfn.debathena to chfn.moira.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Mon, 06 Aug 2007 03:17:10 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena2) unstable; urgency=low
+
+  * Add missing build dependencies to libmoira-dev.
+  * Section: debathena/net.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 17 Jul 2007 06:34:07 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Wed, 14 Feb 2007 00:53:24 -0500
--- debathena-moira-4.0.0+cvs20080830.orig/debian/debathena-moira-clients.install
+++ debathena-moira-4.0.0+cvs20080830/debian/debathena-moira-clients.install
@@ -0,0 +1,18 @@
+usr/bin/addusr
+usr/bin/blanche
+usr/bin/chfn.moira
+usr/bin/chpobox
+usr/bin/chsh.moira
+usr/bin/mitch
+usr/bin/namespace
+usr/bin/moira
+usr/bin/mrcheck
+usr/bin/mrtest
+usr/bin/stanley
+usr/bin/stella
+usr/bin/mailmaint
+usr/bin/listmaint
+usr/bin/dcmmaint
+usr/bin/usermaint
+usr/share/man/man1/*
+usr/share/man/man8/mrtest.8
--- debathena-moira-4.0.0+cvs20080830.orig/debian/copyright
+++ debathena-moira-4.0.0+cvs20080830/debian/copyright
@@ -0,0 +1,20 @@
+The Moria source code was obtained from the Moira CVS repository at 
+/afs/athena.mit.edu/astaff/project/moiradev, and is licensed as follows:
+
+  Copyright (C) 1987-1998 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.
+
+This Debian package was created as part of the Debian-Athena Project
+<http://web.mit.edu/debathena/www/> of the MIT Student Information
+Processing Board, and is released to the public domain.
--- debathena-moira-4.0.0+cvs20080830.orig/debian/rules
+++ debathena-moira-4.0.0+cvs20080830/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+
+DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+DEB_CONFIGURE_EXTRA_FLAGS += --with-krb4=$(shell krb5-config --prefix krb4) --with-krb5 --with-hesiod --with-zephyr --with-com_err=/usr --without-oracle --without-afs
+DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
+
+common-install-impl::
+	mv $(DEB_DESTDIR)/usr/bin/chfn $(DEB_DESTDIR)/usr/bin/chfn.moira
+	mv $(DEB_DESTDIR)/usr/bin/chsh $(DEB_DESTDIR)/usr/bin/chsh.moira
+	mv $(DEB_DESTDIR)/usr/share/man/man1/chsh.1 \
+		$(DEB_DESTDIR)/usr/share/man/man1/chsh.moira.1
+	mv $(DEB_DESTDIR)/usr/share/man/man1/chfn.1 \
+		$(DEB_DESTDIR)/usr/share/man/man1/chfn.moira.1
+	dh_install -pdebathena-libmoira-dev include/moira.h lib/mr_et.h \
+		lib/krb_et.h lib/ureg_err.h /usr/include/moira
+	dh_install -pdebathena-libmoira-dev lib/libmoira.a /usr/lib
+
+clean::
+	rm -f util/rsaref/Makefile
--- debathena-moira-4.0.0+cvs20080830.orig/debian/debathena-libmoira-dev.install
+++ debathena-moira-4.0.0+cvs20080830/debian/debathena-libmoira-dev.install
@@ -0,0 +1 @@
+usr/share/man/man3/*
--- debathena-moira-4.0.0+cvs20080830.orig/debian/debathena-moira-update-server.install
+++ debathena-moira-4.0.0+cvs20080830/debian/debathena-moira-update-server.install
@@ -0,0 +1,4 @@
+usr/bin/update_test
+usr/sbin/update_server
+usr/share/man/man8/update_server.8
+etc/athena/moira.conf
--- debathena-moira-4.0.0+cvs20080830.orig/debian/debathena-moira-update-server.init
+++ debathena-moira-4.0.0+cvs20080830/debian/debathena-moira-update-server.init
@@ -0,0 +1,126 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          debathena-moira-update-server
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Moira update_server
+# Description:       The moira update_server program for taking updates from
+#                    moira
+### END INIT INFO
+
+# Author: Evan Broder <broder@mit.edu>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+DESC="Moira update_server"
+NAME=debathena-moira-update-server
+DAEMON=/usr/sbin/update_server
+DAEMON_ARGS=""
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
--- debathena-moira-4.0.0+cvs20080830.orig/debian/patches/series
+++ debathena-moira-4.0.0+cvs20080830/debian/patches/series
@@ -0,0 +1,2 @@
+moira-build-destdir.patch
+install-sample-moira-conf.patch
--- debathena-moira-4.0.0+cvs20080830.orig/debian/patches/install-sample-moira-conf.patch
+++ debathena-moira-4.0.0+cvs20080830/debian/patches/install-sample-moira-conf.patch
@@ -0,0 +1,20 @@
+Index: debathena-moira-4.0.0+cvs20080701/update/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20080701.orig/update/Makefile.in	2008-08-01 11:42:10.000000000 -0400
++++ debathena-moira-4.0.0+cvs20080701/update/Makefile.in	2008-08-01 11:42:10.000000000 -0400
+@@ -22,6 +22,7 @@
+ exec_prefix=@exec_prefix@
+ bindir=@bindir@
+ sbindir=@sbindir@
++sysconfdir=@sysconfdir@
+ 
+ SOBJS=	auth_002.o auth_003.o checksum.o config.o exec_002.o get_file.o \
+ 	update_server.o xfer_002.o xfer_003.o sendrecv.o
+@@ -45,6 +46,7 @@
+ install: all
+ 	$(INSTALL_PROGRAM) update_test $(DESTDIR)$(bindir)
+ 	$(INSTALL_PROGRAM) update_server $(DESTDIR)$(sbindir)
++	$(INSTALL) -m 644 -D moira.conf $(DESTDIR)$(sysconfdir)/athena/moira.conf
+ 
+ update_test: $(COBJS) $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(COBJS) $(LIBS)
--- debathena-moira-4.0.0+cvs20080830.orig/debian/patches/moira-build-destdir.patch
+++ debathena-moira-4.0.0+cvs20080830/debian/patches/moira-build-destdir.patch
@@ -0,0 +1,218 @@
+Index: debathena-moira-4.0.0+cvs20070129/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/Makefile.in	2007-02-14 01:59:19.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/Makefile.in	2007-02-14 02:06:36.000000000 -0500
+@@ -35,11 +35,11 @@
+ 	@for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
+ 
+ install:
+-	$(srcdir)/mkinstalldirs $(bindir) $(sbindir) $(mrbindir) $(mandir)
++	$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)
+ 	@for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
+ 
+ svrinstall:
+-	$(srcdir)/mkinstalldirs $(mrbindir)
++	$(srcdir)/mkinstalldirs $(DESTDIR)$(mrbindir)
+ 	@for d in $(SVRDIRS); do (echo "### Making install in $$d"; cd $$d; $(MAKE) install) || exit 1; done
+ 
+ world: depend all
+Index: debathena-moira-4.0.0+cvs20070129/clients/addusr/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/addusr/Makefile.in	2007-02-14 01:59:19.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/addusr/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) -m 755 addusr $(bindir)
++	$(INSTALL_PROGRAM) -m 755 addusr $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/blanche/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/blanche/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/blanche/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) blanche $(bindir)
++	$(INSTALL_PROGRAM) blanche $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/chfn/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/chfn/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/chfn/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) $(TARGET) $(bindir)
++	$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/chpobox/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/chpobox/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/chpobox/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) $(TARGET) $(bindir)
++	$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/chsh/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/chsh/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/chsh/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) $(TARGET) $(bindir)
++	$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/mailmaint/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/mailmaint/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/mailmaint/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) mailmaint $(bindir)
++	$(INSTALL_PROGRAM) mailmaint $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/mitch/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/mitch/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/mitch/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) mitch $(bindir)
++	$(INSTALL_PROGRAM) mitch $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/moira/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/moira/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/moira/Makefile.in	2007-02-14 02:07:47.000000000 -0500
+@@ -44,14 +44,14 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) namespace $(bindir)
+-	$(INSTALL_PROGRAM) moira $(bindir)
+-	rm -f $(bindir)/listmaint	
+-	ln -s moira $(bindir)/listmaint
+-	rm -f $(bindir)/dcmmaint
+-	ln -s moira $(bindir)/dcmmaint
+-	rm -f $(bindir)/usermaint
+-	ln -s moira $(bindir)/usermaint
++	$(INSTALL_PROGRAM) namespace $(DESTDIR)$(bindir)
++	$(INSTALL_PROGRAM) moira $(DESTDIR)$(bindir)
++	rm -f $(DESTDIR)$(bindir)/listmaint
++	ln -s moira $(DESTDIR)$(bindir)/listmaint
++	rm -f $(DESTDIR)$(bindir)/dcmmaint
++	ln -s moira $(DESTDIR)$(bindir)/dcmmaint
++	rm -f $(DESTDIR)$(bindir)/usermaint
++	ln -s moira $(DESTDIR)$(bindir)/usermaint
+ 
+ moira: $(MOBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(MOBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/mrcheck/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/mrcheck/Makefile.in	2007-02-14 01:59:20.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/mrcheck/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) mrcheck $(bindir)
++	$(INSTALL_PROGRAM) mrcheck $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/mrtest/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/mrtest/Makefile.in	2007-02-14 01:59:21.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/mrtest/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) mrtest $(bindir)
++	$(INSTALL_PROGRAM) mrtest $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/stanley/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/stanley/Makefile.in	2007-02-14 01:59:21.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/stanley/Makefile.in	2007-02-14 01:59:59.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) stanley $(bindir)
++	$(INSTALL_PROGRAM) stanley $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/clients/stella/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/clients/stella/Makefile.in	2007-02-14 01:59:21.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/clients/stella/Makefile.in	2007-02-14 02:00:00.000000000 -0500
+@@ -40,7 +40,7 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) stella $(bindir)
++	$(INSTALL_PROGRAM) stella $(DESTDIR)$(bindir)
+ 
+ $(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+Index: debathena-moira-4.0.0+cvs20070129/man/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/man/Makefile.in	2007-02-14 01:59:21.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/man/Makefile.in	2007-02-14 02:00:00.000000000 -0500
+@@ -32,6 +32,7 @@
+ depend:
+ 
+ install:
+-	for m in $(MAN1); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man1; done
+-	for m in $(MAN3); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man3; done
+-	for m in $(MAN8); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man8; done
++	$(srcdir)/../mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man8
++	for m in $(MAN1); do $(INSTALL_DATA) $(srcdir)/$$m $(DESTDIR)$(mandir)/man1; done
++	for m in $(MAN3); do $(INSTALL_DATA) $(srcdir)/$$m $(DESTDIR)$(mandir)/man3; done
++	for m in $(MAN8); do $(INSTALL_DATA) $(srcdir)/$$m $(DESTDIR)$(mandir)/man8; done
+Index: debathena-moira-4.0.0+cvs20070129/update/Makefile.in
+===================================================================
+--- debathena-moira-4.0.0+cvs20070129.orig/update/Makefile.in	2007-02-14 01:59:21.000000000 -0500
++++ debathena-moira-4.0.0+cvs20070129/update/Makefile.in	2007-02-14 02:00:00.000000000 -0500
+@@ -43,8 +43,8 @@
+ depend:
+ 
+ install: all
+-	$(INSTALL_PROGRAM) update_test $(bindir)
+-	$(INSTALL_PROGRAM) update_server $(sbindir)
++	$(INSTALL_PROGRAM) update_test $(DESTDIR)$(bindir)
++	$(INSTALL_PROGRAM) update_server $(DESTDIR)$(sbindir)
+ 
+ update_test: $(COBJS) $(MR_LIBDEP)
+ 	$(CC) -o $@ $(LDFLAGS) $(COBJS) $(LIBS)
