+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+#export PERL_MM_USE_DEFAULT=1
+
+PERL ?= /usr/bin/perl
+#PACKAGE = $(shell dh_listpackages)
+PACKAGE = freeside
+TMP = $(CURDIR)/debian/$(PACKAGE)
+#DBC_SCRIPTS = $(TMP)/usr/share/dbconfig-common/scripts/freeside
+
+##this is gotten from dbconfig-common
+#DB_TYPE = db_type_is_configured_during_pkg_install_by_dbconfig-common_not_at_build_time
+
+#Data source
+DATASOURCE = DBI:${DB_TYPE}:dbname=freeside
+
+#no chance, it doesn't get backslash-interpolted now...
+##DEBVERSION = `head -1 debian/changelog | cut -d')' -f1 | cut -c11-`
+#DEBVERSION = 1.7.3~rc2-1
+#export VERSION = $(DEBVERSION) (Debian)
+
+#export FREESIDE_CONF = /etc/freeside
+#export FREESIDE_LOG = /var/log/freeside
+#export FREESIDE_LOCK = /var/lock/freeside
+#export FREESIDE_CACHE = $(TMP)/var/cache/freeside
+#FREESIDE_CACHE = $(TMP)/var/cache/freeside
+
+#XXX huh?
+#export FREESIDE_EXPORT = /var/spool/freeside
+
+export FREESIDE_CONF = $(TMP)/usr/local/etc/freeside
+export FREESIDE_LOG = $(TMP)/usr/local/etc/freeside
+export FREESIDE_LOCK = $(TMP)/usr/local/etc/freeside
+export FREESIDE_CACHE = $(TMP)/usr/local/etc/freeside
+export FREESIDE_EXPORT = $(TMP)/usr/local/etc/freeside
+export FREESIDE_SS = $(TMP)/usr/share/docs/freeside
+export DIST_CONF = ${FREESIDE_CONF}/default_conf
+
+#XXX own subdir?
+#export MASON_HANDLER = /usr/share/freeside/handler.pl
+export MASON_HANDLER=$(TMP)-webui/usr/local/etc/freeside/handler.pl
+
+#export FREESIDE_DOCUMENT_ROOT = /usr/share/freeside/www
+export FREESIDE_DOCUMENT_ROOT = $(TMP)-webui/var/www/freeside
+export INIT_FILE = $(TMP).init
+export INIT_INSTALL = /bin/true
+export HTTPD_RESTART = /bin/true
+#export APACHE_CONF = /etc/apache2/conf.d
+export APACHE_CONF = $(TMP)-webui/etc/freeside/apache2
+export FREESIDE_RESTART = /bin/true
+
+#XXX root?
+export INSTALLGROUP = adm
+
+export SELFSERVICE_MACHINES =
+
+#prompt ? XXX these are runtime, not buildtime :/
+export RT_DOMAIN = freeside.biz
+export RT_TIMEZONE = US/Eastern
+export HOSTNAME = localhost
+export FREESIDE_URL = http://$(HOSTNAME)/freeside/
+
+#specific to deb pkg, for purposes of saving off a permanent copy of default
+#config for postinst and that sort of thing
+#export DIST_CONF = /usr/share/freeside/default_conf
+
+#XXX yuck. proper RT layout is entirely necessary
+#this seems to infect way to much of RT with the build location, requiring
+# a kludge to hack it out afterwords. look into using fakeroot (didn't
+# realize it would need to be explicit argh)
+# (but leaving it for now, otherwise can't get RT to put files where we need em)
+export RT_PATH = $(TMP)/opt/rt3
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS