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