aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/postfix/files/0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch
blob: 28199ccdd2ee4b5d56ba2305ea162afb6aaaeae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From cb69ffda0c2cbde6acdc8b01c8d5ff78d81a84fc Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Fri, 19 Jun 2015 17:14:58 +0900
Subject: [PATCH] Change fixed postconf to a variable for cross-compiling

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
---
 Makefile.in     |  2 +-
 postfix-install | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 65e7911..40295be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,7 +22,7 @@ META	= meta/main.cf.proto meta/master.cf.proto meta/postfix-files \
 EXPAND	= sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \
 	    -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);"
 SHLIB_DIR_OVERRIDE = \
-	$${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`}
+	$${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`}
 
 default: update
 
diff --git a/postfix-install b/postfix-install
index e498cd3..8049f43 100644
--- a/postfix-install
+++ b/postfix-install
@@ -244,8 +244,8 @@ test -z "$non_interactive" -a ! -t 0 && {
     exit 1
 }
 
-test -x bin/postconf || {
-    echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2
+test -x "$POSTCONF" || {
+    echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2
     exit 1
 }
 
@@ -266,7 +266,7 @@ do
     case "$junk" in
     *MAIL_VERSION*) 
 	case "$mail_version" in
-	"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
+	"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
 	esac
 	val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1
 	case "$val" in
@@ -454,7 +454,7 @@ template files main.cf.proto and master.cf.proto."
 
 : ${install_root=/}
 : ${tempdir=`pwd`}
-: ${config_directory=`bin/postconf -c conf -h -d config_directory`}
+: ${config_directory=`$POSTCONF -c conf -h -d config_directory`}
 
 # Find out the location of installed configuration files.
 
@@ -520,7 +520,7 @@ test -f $CONFIG_DIRECTORY/main.cf && {
 	case "$junk" in
 	"") eval unset $name;;
 	esac
-	eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} ||
+	eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -hx $name\`} ||
 	    exit 1
     done
 }
@@ -533,7 +533,7 @@ do
     case "$junk" in
     "") eval unset $name;;
     esac
-    eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1
+    eval : \${$name=\`$POSTCONF -c conf -d -hx $name\`} || exit 1
 done
 
 # Override settings manually.
@@ -670,6 +670,8 @@ README_DIRECTORY=$install_root$readme_directory
 SHLIB_DIRECTORY=$install_root$shlib_directory
 META_DIRECTORY=$install_root$meta_directory
 
+test "x$POSTCONF" != "x" || POSTCONF="bin/postconf"
+
 # Avoid repeated tests for existence of these; default permissions suffice.
 
 test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
@@ -841,7 +843,7 @@ IFS="$BACKUP_IFS"
 # the wrong place when Postfix is being upgraded.
 
 case "$mail_version" in
-"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
+"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1
 esac
 
 # Undo MAIL_VERSION expansion at the end of a parameter value. If
@@ -861,7 +863,7 @@ do
     esac
 done
 
-bin/postconf -c $CONFIG_DIRECTORY -e \
+"$POSTCONF" -c $CONFIG_DIRECTORY -e \
     "daemon_directory = $daemon_directory" \
     "data_directory = $data_directory" \
     "command_directory = $command_directory" \
-- 
2.17.1