--- Makefile.orig	1969-12-31 19:00:00.000000000 -0500
+++ Makefile	2008-11-26 23:23:09.000000000 -0500
@@ -0,0 +1,56 @@
+#
+# Largely copied from the FreeBSD ports tree Makefile for dirvish, which was
+# written by Loren M. Lang.
+#
+EXECUTABLES=dirvish dirvish-expire dirvish-locate dirvish-runall
+MAN5=dirvish.conf.5
+MAN8=dirvish.8 dirvish-expire.8 dirvish-locate.8 dirvish-runall.8
+
+#
+# Macports provides DESTDIR on the command line.  The Portfile provides PREFIX.
+#
+INSTPATH=${DESTDIR}${PREFIX}
+CONFDIR=${PREFIX}/etc/dirvish
+MANDIR=${INSTPATH}/share/man
+MAN5DIR=${MANDIR}/man5
+MAN8DIR=${MANDIR}/man8
+SBINDIR=${INSTPATH}/sbin
+STAGE_CONFDIR=${DESTDIR}${CONFDIR}
+
+DIRVISH_DIRS=${CONFDIR} ${MAN5DIR} ${MAN8DIR} ${SBINDIR}
+
+CHMOD=/bin/chmod
+INSTALL=/usr/bin/install
+INSTALL_OWNER=-o root
+INSTALL_GROUP=-g admin
+INSTALL_UCREDS=${INSTALL_OWNER} ${INSTALL_GROUP}
+INSTALL_DATA=${INSTALL} ${INSTALL_UCREDS} -m 444
+INSTALL_DIRS=${INSTALL} -d -m 755
+INSTALL_MAN=${INSTALL_DATA}
+INSTALL_SCRIPT=${INSTALL} ${INSTALL_UCREDS} -m 555
+
+header:
+	echo "#!`which perl`" > header.pl
+	echo "" >> header.pl
+	echo "\$$CONFDIR = \"${CONFDIR}\";" >> header.pl
+
+${EXECUTABLES}:	header
+.for _E in ${EXECUTABLES}
+	cat header.pl ${_E}.pl loadconfig.pl > ${_E} && ${CHMOD} 755 ${_E}
+.endfor
+
+all:	${EXECUTABLES}
+
+install:	${EXECUTABLES}
+.for _E in ${EXECUTABLES}
+	${INSTALL_SCRIPT} ${_E} ${SBINDIR}
+.endfor
+.for _M in ${MAN5}
+	${INSTALL_MAN} ${_M} ${MAN5DIR}
+.endfor
+.for _M in ${MAN8}
+	${INSTALL_MAN} ${_M} ${MAN8DIR}
+.endfor
+	${INSTALL_DIRS} ${STAGE_CONFDIR}
+	${INSTALL_DATA} master.conf.dist ${STAGE_CONFDIR}
+	${INSTALL_DATA} default.conf.dist ${STAGE_CONFDIR}
