#! /bin/sh /usr/share/dpatch/dpatch-run
## 35_install.dpatch by Andreas Metzler
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Exim's installation scripts install the binary as exim-<version>
## DP: - disable this feature.

diff -NurbBp exim.orig/scripts/exim_install exim/scripts/exim_install
--- exim.orig/scripts/exim_install	2009-10-30 16:14:04.000000000 +0100
+++ exim/scripts/exim_install	2009-11-15 12:16:39.000000000 +0100
@@ -218,8 +218,9 @@ while [ $# -gt 0 ]; do
   # The exim binary is handled specially
 
   if [ $name = exim${EXE} ]; then
-    version=exim-`./exim -bV -C /dev/null | \
-      awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
+    version=exim
+#    version=exim-`./exim -bV -C /dev/null | \
+#      awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
 
     if [ "${version}" = "exim-${EXE}" ]; then
       echo $com ""
@@ -369,10 +370,8 @@ done
 
 
 
-# If there is no configuration file, install the default, modifying it to refer
-# to the configured system aliases file. If there is no setting for
-# SYSTEM_ALIASES_FILE, use the traditional /etc/aliases. If the file does not
-# exist, install a default (dummy) for that too.
+# Install default configuration file
+# This is a local Debian modification.
 
 # However, if CONFIGURE_FILE specifies a list of files, skip this code.
 
@@ -395,7 +394,7 @@ elif [ ! -f ${CONFIGURE_FILE} ]; then
   ${real} ${MKDIR} -p `${DIRNAME} ${CONFIGURE_FILE}`
 
   echo sed -e '\\'
-  echo "  \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'\"" '\\'
+  echo "  \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'\"" '\\'
   echo "  ../src/configure.default > \${CONFIGURE_FILE}"
 
   # I can't find a way of writing this using the ${real} feature because
@@ -404,7 +403,7 @@ elif [ ! -f ${CONFIGURE_FILE} ]; then
 
   if [ "$real" = "" ] ; then
     sed -e \
-      "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'" \
+      "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'" \
       ../src/configure.default > ${CONFIGURE_FILE}
   else
     true
