mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
postfix: Fix indentation
* we're using 4 spaces, not mix of tabs and spaces\! Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Joe MacDonald
parent
66be3df87d
commit
770994c2f8
@@ -7,8 +7,8 @@ has a definite Sendmail-ish flavor, but the inside is completely different."
|
|||||||
HOMEPAGE= "http://www.postfix.org"
|
HOMEPAGE= "http://www.postfix.org"
|
||||||
SECTION = "console/network"
|
SECTION = "console/network"
|
||||||
DEPENDS = "virtual/db libpcre openssl postfix-native \
|
DEPENDS = "virtual/db libpcre openssl postfix-native \
|
||||||
${@base_contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
|
${@base_contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
|
||||||
${@base_contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
|
${@base_contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
|
||||||
"
|
"
|
||||||
DEPENDS_virtclass-native = "virtual/db-native openssl-native libpcre-native"
|
DEPENDS_virtclass-native = "virtual/db-native openssl-native libpcre-native"
|
||||||
|
|
||||||
@@ -16,14 +16,14 @@ LICENSE = "IPL-1.0"
|
|||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
|
||||||
|
|
||||||
SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
|
SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
|
||||||
file://makedefs.patch \
|
file://makedefs.patch \
|
||||||
file://install.patch \
|
file://install.patch \
|
||||||
file://main.cf_2.0 \
|
file://main.cf_2.0 \
|
||||||
file://postfix \
|
file://postfix \
|
||||||
file://internal_recipient \
|
file://internal_recipient \
|
||||||
file://postfix.service \
|
file://postfix.service \
|
||||||
file://aliasesdb \
|
file://aliasesdb \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/postfix-${PV}"
|
S = "${WORKDIR}/postfix-${PV}"
|
||||||
|
|
||||||
@@ -49,9 +49,9 @@ export SYSLIBS = "${LDFLAGS}"
|
|||||||
|
|
||||||
# ldap support
|
# ldap support
|
||||||
export CCARGS-ldap = "\
|
export CCARGS-ldap = "\
|
||||||
${@base_contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}"
|
${@base_contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}"
|
||||||
export AUXLIBS-ldap = "\
|
export AUXLIBS-ldap = "\
|
||||||
${@base_contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}"
|
${@base_contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}"
|
||||||
|
|
||||||
# no native openldap
|
# no native openldap
|
||||||
export CCARGS-ldap_virtclass-native = ""
|
export CCARGS-ldap_virtclass-native = ""
|
||||||
@@ -60,9 +60,9 @@ export AUXLIBS-ldap_virtclass-native = ""
|
|||||||
# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
|
# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
|
||||||
# current openldap didn't enable SASL
|
# current openldap didn't enable SASL
|
||||||
export CCARGS-sasl = "\
|
export CCARGS-sasl = "\
|
||||||
${@base_contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}"
|
${@base_contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}"
|
||||||
export AUXLIBS-sasl = "\
|
export AUXLIBS-sasl = "\
|
||||||
${@base_contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
|
${@base_contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
|
||||||
export CCARGS-sasl_virtclass-native = ""
|
export CCARGS-sasl_virtclass-native = ""
|
||||||
export AUXLIBS-sasl_virtclass-native = ""
|
export AUXLIBS-sasl_virtclass-native = ""
|
||||||
|
|
||||||
@@ -76,137 +76,137 @@ export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
|
|||||||
EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
|
EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
|
||||||
|
|
||||||
do_compile () {
|
do_compile () {
|
||||||
unset CFLAGS CPPFLAGS CXXFLAGS
|
unset CFLAGS CPPFLAGS CXXFLAGS
|
||||||
local native_build
|
local native_build
|
||||||
|
|
||||||
native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}"
|
native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}"
|
||||||
|
|
||||||
# if not native build, then pass SYSTEM and RELEASE to makedefs
|
# if not native build, then pass SYSTEM and RELEASE to makedefs
|
||||||
if [ "${native_build}" != "1" ]; then
|
if [ "${native_build}" != "1" ]; then
|
||||||
# uname -s for target
|
# uname -s for target
|
||||||
SYSTEM="Linux"
|
SYSTEM="Linux"
|
||||||
|
|
||||||
# uname -r, use 2.6 as bottomline, even target kernel ver > 2.6
|
# uname -r, use 2.6 as bottomline, even target kernel ver > 2.6
|
||||||
RELEASE="2.6.34"
|
RELEASE="2.6.34"
|
||||||
sed -i -e \
|
sed -i -e \
|
||||||
"s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \
|
"s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \
|
||||||
${S}/Makefile.in
|
${S}/Makefile.in
|
||||||
export BUILD_SYSROOT="${STAGING_DIR_HOST}"
|
export BUILD_SYSROOT="${STAGING_DIR_HOST}"
|
||||||
export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \
|
export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \
|
||||||
${STAGING_LIBDIR}"
|
${STAGING_LIBDIR}"
|
||||||
else
|
else
|
||||||
# native build
|
# native build
|
||||||
export BUILD_SYSROOT="${STAGING_DIR_NATIVE}"
|
export BUILD_SYSROOT="${STAGING_DIR_NATIVE}"
|
||||||
|
|
||||||
# ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32)
|
# ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32)
|
||||||
# on 64 bits, 32 libs in i386-linux-gnu
|
# on 64 bits, 32 libs in i386-linux-gnu
|
||||||
# let makedefs finds nsl and resolv libs, host CC will link
|
# let makedefs finds nsl and resolv libs, host CC will link
|
||||||
# the correct libraries
|
# the correct libraries
|
||||||
BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \
|
BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \
|
||||||
sed -n '/^libraries: =/s/libraries: =//p' | \
|
sed -n '/^libraries: =/s/libraries: =//p' | \
|
||||||
sed -e 's/:/\n/g' | xargs -n1 readlink -f | \
|
sed -e 's/:/\n/g' | xargs -n1 readlink -f | \
|
||||||
grep -v 'gcc\|/[0-9.]\+$' | sort -u)"
|
grep -v 'gcc\|/[0-9.]\+$' | sort -u)"
|
||||||
if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then
|
if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then
|
||||||
BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \
|
BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \
|
||||||
/lib/x86_64-linux-gnu \
|
/lib/x86_64-linux-gnu \
|
||||||
/usr/lib /lib \
|
/usr/lib /lib \
|
||||||
/lib/i386-linux-gnu"
|
/lib/i386-linux-gnu"
|
||||||
fi
|
fi
|
||||||
export BUILD_SYSROOT_NSL_PATH
|
export BUILD_SYSROOT_NSL_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
oe_runmake makefiles
|
oe_runmake makefiles
|
||||||
oe_runmake
|
oe_runmake
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_prepend_virtclass-native() {
|
do_install_prepend_virtclass-native() {
|
||||||
export POSTCONF="bin/postconf"
|
export POSTCONF="bin/postconf"
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN} = "postfix.service"
|
SYSTEMD_SERVICE_${PN} = "postfix.service"
|
||||||
SYSTEMD_AUTO_ENABLE = "disable"
|
SYSTEMD_AUTO_ENABLE = "disable"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
sh ./postfix-install 'install_root=${D}' \
|
sh ./postfix-install 'install_root=${D}' \
|
||||||
'config_directory=${sysconfdir}/postfix' \
|
'config_directory=${sysconfdir}/postfix' \
|
||||||
'daemon_directory=${exec_prefix}/libexec/postfix' \
|
'daemon_directory=${exec_prefix}/libexec/postfix' \
|
||||||
'command_directory=${sbindir}' \
|
'command_directory=${sbindir}' \
|
||||||
'queue_directory=${localstatedir}/spool/postfix' \
|
'queue_directory=${localstatedir}/spool/postfix' \
|
||||||
'sendmail_path=${sbindir}/sendmail.postfix' \
|
'sendmail_path=${sbindir}/sendmail.postfix' \
|
||||||
'newaliases_path=${bindir}/newaliases' \
|
'newaliases_path=${bindir}/newaliases' \
|
||||||
'mailq_path=${bindir}/mailq' \
|
'mailq_path=${bindir}/mailq' \
|
||||||
'manpage_directory=${mandir}' \
|
'manpage_directory=${mandir}' \
|
||||||
'readme_directory=${datadir}/doc/postfix' \
|
'readme_directory=${datadir}/doc/postfix' \
|
||||||
'data_directory=${localstatedir}/lib/postfix' \
|
'data_directory=${localstatedir}/lib/postfix' \
|
||||||
-non-interactive
|
-non-interactive
|
||||||
rm -rf ${D}${localstatedir}/spool/postfix
|
rm -rf ${D}${localstatedir}/spool/postfix
|
||||||
mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
|
mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
|
||||||
install -d ${D}${sysconfdir}/init.d
|
install -d ${D}${sysconfdir}/init.d
|
||||||
install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
|
install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
|
||||||
install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
|
install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
|
||||||
install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
|
install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
|
||||||
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
|
install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
|
||||||
sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service
|
sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service
|
||||||
|
|
||||||
install -m 0755 ${WORKDIR}/aliasesdb ${D}${exec_prefix}/libexec/postfix/
|
install -m 0755 ${WORKDIR}/aliasesdb ${D}${exec_prefix}/libexec/postfix/
|
||||||
|
|
||||||
install -m 770 -d ${D}${localstatedir}/spool/postfix
|
install -m 770 -d ${D}${localstatedir}/spool/postfix
|
||||||
chown postfix:postfix ${D}${localstatedir}/spool/postfix
|
chown postfix:postfix ${D}${localstatedir}/spool/postfix
|
||||||
chown postfix:postfix ${D}${localstatedir}/lib/postfix
|
chown postfix:postfix ${D}${localstatedir}/lib/postfix
|
||||||
|
|
||||||
install -m 2755 -d ${D}${localstatedir}/spool/mail
|
install -m 2755 -d ${D}${localstatedir}/spool/mail
|
||||||
chown postfix:nogroup ${D}${localstatedir}/spool/mail
|
chown postfix:nogroup ${D}${localstatedir}/spool/mail
|
||||||
install -m 0755 -d ${D}${localstatedir}/lib/postfix
|
install -m 0755 -d ${D}${localstatedir}/lib/postfix
|
||||||
chown postfix:nogroup ${D}${localstatedir}/lib/postfix
|
chown postfix:nogroup ${D}${localstatedir}/lib/postfix
|
||||||
install -m 0755 -d ${D}${localstatedir}/spool/postfix
|
install -m 0755 -d ${D}${localstatedir}/spool/postfix
|
||||||
chown root:postfix ${D}${localstatedir}/spool/postfix
|
chown root:postfix ${D}${localstatedir}/spool/postfix
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/active
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/active
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/active
|
chown postfix:root ${D}${localstatedir}/spool/postfix/active
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/bounce
|
chown postfix:root ${D}${localstatedir}/spool/postfix/bounce
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt
|
chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/defer
|
chown postfix:root ${D}${localstatedir}/spool/postfix/defer
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/deferred
|
chown postfix:root ${D}${localstatedir}/spool/postfix/deferred
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/flush
|
chown postfix:root ${D}${localstatedir}/spool/postfix/flush
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/hold
|
chown postfix:root ${D}${localstatedir}/spool/postfix/hold
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/incoming
|
chown postfix:root ${D}${localstatedir}/spool/postfix/incoming
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/saved
|
chown postfix:root ${D}${localstatedir}/spool/postfix/saved
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/trace
|
chown postfix:root ${D}${localstatedir}/spool/postfix/trace
|
||||||
install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop
|
install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop
|
||||||
chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop
|
chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop
|
||||||
install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid
|
install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid
|
||||||
chown root:root ${D}${localstatedir}/spool/postfix/pid
|
chown root:root ${D}${localstatedir}/spool/postfix/pid
|
||||||
install -m 0700 -d ${D}${localstatedir}/spool/postfix/private
|
install -m 0700 -d ${D}${localstatedir}/spool/postfix/private
|
||||||
chown postfix:root ${D}${localstatedir}/spool/postfix/private
|
chown postfix:root ${D}${localstatedir}/spool/postfix/private
|
||||||
install -m 0710 -d ${D}${localstatedir}/spool/postfix/public
|
install -m 0710 -d ${D}${localstatedir}/spool/postfix/public
|
||||||
chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public
|
chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public
|
||||||
install -m 0755 -d ${D}${localstatedir}/spool/vmail
|
install -m 0755 -d ${D}${localstatedir}/spool/vmail
|
||||||
chown vmail:vmail ${D}${localstatedir}/spool/vmail
|
chown vmail:vmail ${D}${localstatedir}/spool/vmail
|
||||||
|
|
||||||
chown :postdrop ${D}${sbindir}/postqueue
|
chown :postdrop ${D}${sbindir}/postqueue
|
||||||
chown :postdrop ${D}${sbindir}/postdrop
|
chown :postdrop ${D}${sbindir}/postdrop
|
||||||
chmod g+s ${D}${sbindir}/postqueue
|
chmod g+s ${D}${sbindir}/postqueue
|
||||||
chmod g+s ${D}${sbindir}/postdrop
|
chmod g+s ${D}${sbindir}/postdrop
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_class-native() {
|
do_install_append_class-native() {
|
||||||
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases
|
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases
|
||||||
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
|
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_class-target() {
|
do_install_append_class-target() {
|
||||||
# Remove references to buildmachine paths in target makedefs.out
|
# Remove references to buildmachine paths in target makedefs.out
|
||||||
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
|
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
|
||||||
}
|
}
|
||||||
|
|
||||||
NATIVE_INSTALL_WORKS = "1"
|
NATIVE_INSTALL_WORKS = "1"
|
||||||
@@ -217,19 +217,19 @@ ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
|
|||||||
ALTERNATIVE_PRIORITY = "120"
|
ALTERNATIVE_PRIORITY = "120"
|
||||||
|
|
||||||
pkg_postinst_${PN} () {
|
pkg_postinst_${PN} () {
|
||||||
if [ "x$D" = "x" ]; then
|
if [ "x$D" = "x" ]; then
|
||||||
touch /etc/aliases
|
touch /etc/aliases
|
||||||
newaliases
|
newaliases
|
||||||
|
|
||||||
# generate virtual_alias, default is hash
|
# generate virtual_alias, default is hash
|
||||||
touch /etc/postfix/virtual_alias
|
touch /etc/postfix/virtual_alias
|
||||||
postmap /etc/postfix/virtual_alias
|
postmap /etc/postfix/virtual_alias
|
||||||
else
|
else
|
||||||
touch $D/etc/aliases
|
touch $D/etc/aliases
|
||||||
newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
|
newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
|
||||||
touch $D/etc/postfix/virtual_alias
|
touch $D/etc/postfix/virtual_alias
|
||||||
postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
|
postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exclude .debug directories from the main package
|
# Exclude .debug directories from the main package
|
||||||
|
|||||||
Reference in New Issue
Block a user