forked from ports/contrib
104 lines
3.0 KiB
Plaintext
104 lines
3.0 KiB
Plaintext
# Description: Secure and fast drop-in replacement for Sendmail (MTA)
|
|
# URL: https://www.postfix.org/
|
|
# Maintainer: Steffen Nurpmeso, steffen at sdaoden dot eu
|
|
# Depends on: libpcre lmdb openssl
|
|
# Optional: dovecot cyrus-sasl
|
|
|
|
rname=postfix
|
|
name=postfix-lmdb
|
|
version=3.6.3
|
|
release=2
|
|
source=(
|
|
https://de.${rname}.org/ftpmirror/official/${rname}-${version}.tar.gz
|
|
lmdb-default.patch
|
|
postfix-install.patch
|
|
closefrom.patch
|
|
post-install
|
|
${rname}.rc
|
|
README
|
|
aliases
|
|
relay_clientcerts
|
|
client_restrict sender_access sender_restrict
|
|
main-addon.cf master.patch
|
|
)
|
|
|
|
build() {
|
|
cd ${rname}-${version}
|
|
|
|
patch -p1 < "${SRC}"/lmdb-default.patch
|
|
patch -p1 < "${SRC}"/postfix-install.patch
|
|
patch -p1 < "${SRC}"/closefrom.patch
|
|
|
|
cca='-DNO_DB -DNO_EAI -DNO_NIS -DNO_NISPLUS '
|
|
cca=${cca}' -DHAS_LMDB -DDEF_DB_TYPE=\"lmdb\" -DHAS_PCRE -DUSE_TLS'
|
|
aux=
|
|
|
|
if prt-get isinst dovecot; then # TODO UNTESTED!
|
|
cca=${cca}' -DUSE_SASL_AUTH -DDEF_SASL_SERVER=dovecot'
|
|
fi
|
|
|
|
if prt-get isinst cyrus-sasl; then # TODO UNTESTED!
|
|
cca=${cca}' -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
|
|
aux=${aux}' -lsasl2'
|
|
fi
|
|
|
|
make tidy
|
|
make pie=yes shared=yes \
|
|
DEBUG= \
|
|
CCARGS="${cca}" \
|
|
OPT="${CFLAGS}" \
|
|
AUXLIBS_LMDB=-llmdb \
|
|
AUXLIBS_PCRE=-lpcre \
|
|
AUXLIBS="-lssl -lcrypto" \
|
|
${aux} \
|
|
install_root="${PKG}" \
|
|
command_directory=/usr/sbin \
|
|
config_directory=/etc/${name} \
|
|
daemon_directory=/usr/lib/${name} \
|
|
data_directory=/var/lib/${name} \
|
|
html_directory=no \
|
|
mail_spool_directory=/var/spool/mail \
|
|
manpage_directory=/usr/share/man \
|
|
meta_directory=/etc/${name} \
|
|
queue_directory=/var/spool/${name} \
|
|
readme_directory=no \
|
|
shlib_directory=/usr/lib/${name} \
|
|
makefiles
|
|
|
|
make OPT="$CFLAGS"
|
|
|
|
make \
|
|
install_root="${PKG}" \
|
|
command_directory=/usr/sbin \
|
|
config_directory=/etc/${name} \
|
|
daemon_directory=/usr/lib/${name} \
|
|
data_directory=/var/lib/${name} \
|
|
html_directory=no \
|
|
mail_spool_directory=/var/spool/mail \
|
|
manpage_directory=/usr/share/man \
|
|
meta_directory=/etc/${name} \
|
|
queue_directory=/var/spool/${name} \
|
|
readme_directory=no \
|
|
shlib_directory=/usr/lib/${name} \
|
|
non-interactive-package
|
|
|
|
install -D -m 0755 "${SRC}"/${rname}.rc "${PKG}"/etc/rc.d/${name}
|
|
install -m 0644 "${SRC}"/aliases "${PKG}"/etc/${name}/aliases
|
|
install -m 0644 "${SRC}"/README "${PKG}"/etc/${name}/CRUX-README.txt
|
|
install -m 0644 "${SRC}"/relay_clientcerts \
|
|
"${PKG}"/etc/${name}/relay_clientcerts
|
|
install -m 0644 "${SRC}"/sender_restrict \
|
|
"${PKG}"/etc/${name}/sender_restrict
|
|
sed -E -i'' \
|
|
-e 's/^(setgid_group.+)$/#\1/' \
|
|
-e 's/^(inet_protocols.+)$/#\1/' \
|
|
"${PKG}"/etc/${name}/main.cf
|
|
cat "${SRC}"/main-addon.cf >> "${PKG}"/etc/${name}/main.cf
|
|
(
|
|
cd "${PKG}"/etc/${name}
|
|
patch -p0 < "${SRC}"/master.patch
|
|
)
|
|
}
|
|
|
|
# s-sh-mode
|