summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2014-11-21 15:18:10 +0100
committerJoe MacDonald <joe_macdonald@mentor.com>2014-11-21 16:32:50 -0500
commit770994c2f87b9d20772b1d4dbae20f96477db0c2 (patch)
treedd2e1038217512a54544f9c28635ed0014c0cd0b /meta-networking
parent66be3df87d9caaf4af20433eb0aca6f062463eae (diff)
downloadmeta-openembedded-770994c2f87b9d20772b1d4dbae20f96477db0c2.tar.gz
postfix: Fix indentation
* we're using 4 spaces, not mix of tabs and spaces\! Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc286
1 files changed, 143 insertions, 143 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index caf1f8077..28563afab 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -7,8 +7,8 @@ has a definite Sendmail-ish flavor, but the inside is completely different."
7HOMEPAGE= "http://www.postfix.org" 7HOMEPAGE= "http://www.postfix.org"
8SECTION = "console/network" 8SECTION = "console/network"
9DEPENDS = "virtual/db libpcre openssl postfix-native \ 9DEPENDS = "virtual/db libpcre openssl postfix-native \
10 ${@base_contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \ 10 ${@base_contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
11 ${@base_contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \ 11 ${@base_contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
12" 12"
13DEPENDS_virtclass-native = "virtual/db-native openssl-native libpcre-native" 13DEPENDS_virtclass-native = "virtual/db-native openssl-native libpcre-native"
14 14
@@ -16,14 +16,14 @@ LICENSE = "IPL-1.0"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354" 16LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
17 17
18SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ 18SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
19 file://makedefs.patch \ 19 file://makedefs.patch \
20 file://install.patch \ 20 file://install.patch \
21 file://main.cf_2.0 \ 21 file://main.cf_2.0 \
22 file://postfix \ 22 file://postfix \
23 file://internal_recipient \ 23 file://internal_recipient \
24 file://postfix.service \ 24 file://postfix.service \
25 file://aliasesdb \ 25 file://aliasesdb \
26 " 26"
27 27
28S = "${WORKDIR}/postfix-${PV}" 28S = "${WORKDIR}/postfix-${PV}"
29 29
@@ -49,9 +49,9 @@ export SYSLIBS = "${LDFLAGS}"
49 49
50# ldap support 50# ldap support
51export CCARGS-ldap = "\ 51export CCARGS-ldap = "\
52 ${@base_contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}" 52 ${@base_contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}"
53export AUXLIBS-ldap = "\ 53export AUXLIBS-ldap = "\
54 ${@base_contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}" 54 ${@base_contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}"
55 55
56# no native openldap 56# no native openldap
57export CCARGS-ldap_virtclass-native = "" 57export CCARGS-ldap_virtclass-native = ""
@@ -60,9 +60,9 @@ export AUXLIBS-ldap_virtclass-native = ""
60# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH 60# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
61# current openldap didn't enable SASL 61# current openldap didn't enable SASL
62export CCARGS-sasl = "\ 62export CCARGS-sasl = "\
63 ${@base_contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}" 63 ${@base_contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}"
64export AUXLIBS-sasl = "\ 64export AUXLIBS-sasl = "\
65 ${@base_contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}" 65 ${@base_contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
66export CCARGS-sasl_virtclass-native = "" 66export CCARGS-sasl_virtclass-native = ""
67export AUXLIBS-sasl_virtclass-native = "" 67export AUXLIBS-sasl_virtclass-native = ""
68 68
@@ -76,137 +76,137 @@ export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
76EXTRA_OEMAKE += "OPT= DEBUG= OPTS= " 76EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
77 77
78do_compile () { 78do_compile () {
79 unset CFLAGS CPPFLAGS CXXFLAGS 79 unset CFLAGS CPPFLAGS CXXFLAGS
80 local native_build 80 local native_build
81 81
82 native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}" 82 native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}"
83 83
84 # if not native build, then pass SYSTEM and RELEASE to makedefs 84 # if not native build, then pass SYSTEM and RELEASE to makedefs
85 if [ "${native_build}" != "1" ]; then 85 if [ "${native_build}" != "1" ]; then
86 # uname -s for target 86 # uname -s for target
87 SYSTEM="Linux" 87 SYSTEM="Linux"
88 88
89 # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6 89 # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6
90 RELEASE="2.6.34" 90 RELEASE="2.6.34"
91 sed -i -e \ 91 sed -i -e \
92 "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \ 92 "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \
93 ${S}/Makefile.in 93 ${S}/Makefile.in
94 export BUILD_SYSROOT="${STAGING_DIR_HOST}" 94 export BUILD_SYSROOT="${STAGING_DIR_HOST}"
95 export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \ 95 export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \
96 ${STAGING_LIBDIR}" 96 ${STAGING_LIBDIR}"
97 else 97 else
98 # native build 98 # native build
99 export BUILD_SYSROOT="${STAGING_DIR_NATIVE}" 99 export BUILD_SYSROOT="${STAGING_DIR_NATIVE}"
100 100
101 # ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32) 101 # ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32)
102 # on 64 bits, 32 libs in i386-linux-gnu 102 # on 64 bits, 32 libs in i386-linux-gnu
103 # let makedefs finds nsl and resolv libs, host CC will link 103 # let makedefs finds nsl and resolv libs, host CC will link
104 # the correct libraries 104 # the correct libraries
105 BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \ 105 BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \
106 sed -n '/^libraries: =/s/libraries: =//p' | \ 106 sed -n '/^libraries: =/s/libraries: =//p' | \
107 sed -e 's/:/\n/g' | xargs -n1 readlink -f | \ 107 sed -e 's/:/\n/g' | xargs -n1 readlink -f | \
108 grep -v 'gcc\|/[0-9.]\+$' | sort -u)" 108 grep -v 'gcc\|/[0-9.]\+$' | sort -u)"
109 if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then 109 if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then
110 BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \ 110 BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \
111 /lib/x86_64-linux-gnu \ 111 /lib/x86_64-linux-gnu \
112 /usr/lib /lib \ 112 /usr/lib /lib \
113 /lib/i386-linux-gnu" 113 /lib/i386-linux-gnu"
114 fi 114 fi
115 export BUILD_SYSROOT_NSL_PATH 115 export BUILD_SYSROOT_NSL_PATH
116 fi 116 fi
117 117
118 oe_runmake makefiles 118 oe_runmake makefiles
119 oe_runmake 119 oe_runmake
120} 120}
121 121
122do_install_prepend_virtclass-native() { 122do_install_prepend_virtclass-native() {
123 export POSTCONF="bin/postconf" 123 export POSTCONF="bin/postconf"
124} 124}
125 125
126SYSTEMD_SERVICE_${PN} = "postfix.service" 126SYSTEMD_SERVICE_${PN} = "postfix.service"
127SYSTEMD_AUTO_ENABLE = "disable" 127SYSTEMD_AUTO_ENABLE = "disable"
128 128
129do_install () { 129do_install () {
130 sh ./postfix-install 'install_root=${D}' \ 130 sh ./postfix-install 'install_root=${D}' \
131 'config_directory=${sysconfdir}/postfix' \ 131 'config_directory=${sysconfdir}/postfix' \
132 'daemon_directory=${exec_prefix}/libexec/postfix' \ 132 'daemon_directory=${exec_prefix}/libexec/postfix' \
133 'command_directory=${sbindir}' \ 133 'command_directory=${sbindir}' \
134 'queue_directory=${localstatedir}/spool/postfix' \ 134 'queue_directory=${localstatedir}/spool/postfix' \
135 'sendmail_path=${sbindir}/sendmail.postfix' \ 135 'sendmail_path=${sbindir}/sendmail.postfix' \
136 'newaliases_path=${bindir}/newaliases' \ 136 'newaliases_path=${bindir}/newaliases' \
137 'mailq_path=${bindir}/mailq' \ 137 'mailq_path=${bindir}/mailq' \
138 'manpage_directory=${mandir}' \ 138 'manpage_directory=${mandir}' \
139 'readme_directory=${datadir}/doc/postfix' \ 139 'readme_directory=${datadir}/doc/postfix' \
140 'data_directory=${localstatedir}/lib/postfix' \ 140 'data_directory=${localstatedir}/lib/postfix' \
141 -non-interactive 141 -non-interactive
142 rm -rf ${D}${localstatedir}/spool/postfix 142 rm -rf ${D}${localstatedir}/spool/postfix
143 mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf 143 mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
144 install -d ${D}${sysconfdir}/init.d 144 install -d ${D}${sysconfdir}/init.d
145 install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf 145 install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
146 install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix 146 install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
147 install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient 147 install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
148 148
149 install -d ${D}${systemd_unitdir}/system 149 install -d ${D}${systemd_unitdir}/system
150 install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system 150 install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
151 sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service 151 sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service
152 152
153 install -m 0755 ${WORKDIR}/aliasesdb ${D}${exec_prefix}/libexec/postfix/ 153 install -m 0755 ${WORKDIR}/aliasesdb ${D}${exec_prefix}/libexec/postfix/
154 154
155 install -m 770 -d ${D}${localstatedir}/spool/postfix 155 install -m 770 -d ${D}${localstatedir}/spool/postfix
156 chown postfix:postfix ${D}${localstatedir}/spool/postfix 156 chown postfix:postfix ${D}${localstatedir}/spool/postfix
157 chown postfix:postfix ${D}${localstatedir}/lib/postfix 157 chown postfix:postfix ${D}${localstatedir}/lib/postfix
158 158
159 install -m 2755 -d ${D}${localstatedir}/spool/mail 159 install -m 2755 -d ${D}${localstatedir}/spool/mail
160 chown postfix:nogroup ${D}${localstatedir}/spool/mail 160 chown postfix:nogroup ${D}${localstatedir}/spool/mail
161 install -m 0755 -d ${D}${localstatedir}/lib/postfix 161 install -m 0755 -d ${D}${localstatedir}/lib/postfix
162 chown postfix:nogroup ${D}${localstatedir}/lib/postfix 162 chown postfix:nogroup ${D}${localstatedir}/lib/postfix
163 install -m 0755 -d ${D}${localstatedir}/spool/postfix 163 install -m 0755 -d ${D}${localstatedir}/spool/postfix
164 chown root:postfix ${D}${localstatedir}/spool/postfix 164 chown root:postfix ${D}${localstatedir}/spool/postfix
165 install -m 0700 -d ${D}${localstatedir}/spool/postfix/active 165 install -m 0700 -d ${D}${localstatedir}/spool/postfix/active
166 chown postfix:root ${D}${localstatedir}/spool/postfix/active 166 chown postfix:root ${D}${localstatedir}/spool/postfix/active
167 install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce 167 install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce
168 chown postfix:root ${D}${localstatedir}/spool/postfix/bounce 168 chown postfix:root ${D}${localstatedir}/spool/postfix/bounce
169 install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt 169 install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt
170 chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt 170 chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt
171 install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer 171 install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer
172 chown postfix:root ${D}${localstatedir}/spool/postfix/defer 172 chown postfix:root ${D}${localstatedir}/spool/postfix/defer
173 install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred 173 install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred
174 chown postfix:root ${D}${localstatedir}/spool/postfix/deferred 174 chown postfix:root ${D}${localstatedir}/spool/postfix/deferred
175 install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush 175 install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush
176 chown postfix:root ${D}${localstatedir}/spool/postfix/flush 176 chown postfix:root ${D}${localstatedir}/spool/postfix/flush
177 install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold 177 install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold
178 chown postfix:root ${D}${localstatedir}/spool/postfix/hold 178 chown postfix:root ${D}${localstatedir}/spool/postfix/hold
179 install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming 179 install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming
180 chown postfix:root ${D}${localstatedir}/spool/postfix/incoming 180 chown postfix:root ${D}${localstatedir}/spool/postfix/incoming
181 install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved 181 install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved
182 chown postfix:root ${D}${localstatedir}/spool/postfix/saved 182 chown postfix:root ${D}${localstatedir}/spool/postfix/saved
183 install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace 183 install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace
184 chown postfix:root ${D}${localstatedir}/spool/postfix/trace 184 chown postfix:root ${D}${localstatedir}/spool/postfix/trace
185 install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop 185 install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop
186 chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop 186 chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop
187 install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid 187 install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid
188 chown root:root ${D}${localstatedir}/spool/postfix/pid 188 chown root:root ${D}${localstatedir}/spool/postfix/pid
189 install -m 0700 -d ${D}${localstatedir}/spool/postfix/private 189 install -m 0700 -d ${D}${localstatedir}/spool/postfix/private
190 chown postfix:root ${D}${localstatedir}/spool/postfix/private 190 chown postfix:root ${D}${localstatedir}/spool/postfix/private
191 install -m 0710 -d ${D}${localstatedir}/spool/postfix/public 191 install -m 0710 -d ${D}${localstatedir}/spool/postfix/public
192 chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public 192 chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public
193 install -m 0755 -d ${D}${localstatedir}/spool/vmail 193 install -m 0755 -d ${D}${localstatedir}/spool/vmail
194 chown vmail:vmail ${D}${localstatedir}/spool/vmail 194 chown vmail:vmail ${D}${localstatedir}/spool/vmail
195 195
196 chown :postdrop ${D}${sbindir}/postqueue 196 chown :postdrop ${D}${sbindir}/postqueue
197 chown :postdrop ${D}${sbindir}/postdrop 197 chown :postdrop ${D}${sbindir}/postdrop
198 chmod g+s ${D}${sbindir}/postqueue 198 chmod g+s ${D}${sbindir}/postqueue
199 chmod g+s ${D}${sbindir}/postdrop 199 chmod g+s ${D}${sbindir}/postdrop
200} 200}
201 201
202do_install_append_class-native() { 202do_install_append_class-native() {
203 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases 203 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases
204 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq 204 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
205} 205}
206 206
207do_install_append_class-target() { 207do_install_append_class-target() {
208 # Remove references to buildmachine paths in target makedefs.out 208 # Remove references to buildmachine paths in target makedefs.out
209 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out 209 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
210} 210}
211 211
212NATIVE_INSTALL_WORKS = "1" 212NATIVE_INSTALL_WORKS = "1"
@@ -217,19 +217,19 @@ ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
217ALTERNATIVE_PRIORITY = "120" 217ALTERNATIVE_PRIORITY = "120"
218 218
219pkg_postinst_${PN} () { 219pkg_postinst_${PN} () {
220 if [ "x$D" = "x" ]; then 220 if [ "x$D" = "x" ]; then
221 touch /etc/aliases 221 touch /etc/aliases
222 newaliases 222 newaliases
223 223
224 # generate virtual_alias, default is hash 224 # generate virtual_alias, default is hash
225 touch /etc/postfix/virtual_alias 225 touch /etc/postfix/virtual_alias
226 postmap /etc/postfix/virtual_alias 226 postmap /etc/postfix/virtual_alias
227 else 227 else
228 touch $D/etc/aliases 228 touch $D/etc/aliases
229 newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases 229 newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
230 touch $D/etc/postfix/virtual_alias 230 touch $D/etc/postfix/virtual_alias
231 postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias 231 postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
232 fi 232 fi
233} 233}
234 234
235# Exclude .debug directories from the main package 235# Exclude .debug directories from the main package