1The exim install script installs a binary named exim-<version>, plus a symlink
2to it named exim.
3In order to achieve this "feature" (of dubious usefulness) it runs the
4executable (on the host) and then filters its output to grab the version number.
5This clearly cannot work if the executable is cross-compiled, so get rid of all
6of it and just install an executable file called exim.
7
8Inspired by:
9http://patch-tracker.debian.org/patch/series/view/exim4/4.76-2/35_install.dpatch
10
11Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
12(rebased against exim 4.89)
13Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
14---
15 scripts/exim_install |    7 +++++--
16 1 files changed, 5 insertions(+), 2 deletions(-)
17
18diff --git a/scripts/exim_install b/scripts/exim_install
19index e68e7d5..487a4e1 100755
20--- a/scripts/exim_install
21+++ b/scripts/exim_install
22@@ -58,6 +58,8 @@
23   shift
24 done
25
26+do_symlink=no
27+
28 # Get the values of BIN_DIRECTORY, CONFIGURE_FILE, INFO_DIRECTORY, NO_SYMLINK,
29 # SYSTEM_ALIASES_FILE, and EXE from the global Makefile (in the build
30 # directory). EXE is empty except in the Cygwin environment. In each case, keep
31@@ -217,9 +219,7 @@
32   # The exim binary is handled specially
33
34   if [ $name = exim${EXE} ]; then
35-    exim="./exim -bV -C /dev/null"
36-    version=exim-`$exim 2>/dev/null | \
37-      awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
38+    version=exim
39
40     if [ "${version}" = "exim-${EXE}" ]; then
41       echo $com ""
42