1f1a81b5d6
* Reduce potential patch conflicts by switching more DESTDIR support to sed * Enable `qmail-netqmail` by default * Install `qmail-viruscan` signatures via CONF_FILES * With `tls` option, don't generate cert, instruct the user at INSTALL time That last change also fixes the source build with `tls` enabled on systems that don't already have a /var/qmail/control, as reported by Thomas Lazar on pkgsrc-users@. While here, add a comment with the new location of the qregex patch. Since it's named strangely, I've also placed a traditionally-named copy on ftp.n.o. Bump PKGREVISION.
88 lines
2.4 KiB
Text
88 lines
2.4 KiB
Text
# $NetBSD: INSTALL,v 1.6 2014/05/30 21:35:04 schmonz Exp $
|
|
|
|
DOCDIR=@DOCDIR@
|
|
EGDIR=@EGDIR@
|
|
OPENSSL=@OPENSSL@
|
|
PKGMANDIR=@PKGMANDIR@
|
|
QMAILDIR=@QMAILDIR@
|
|
QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@
|
|
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
|
|
|
|
VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
|
|
|
|
case ${STAGE} in
|
|
|
|
PRE-INSTALL)
|
|
for dir in $VAR_QMAIL_DIRS; do
|
|
if [ -e ${QMAILDIR}/$dir ]; then
|
|
${CAT} <<EOF
|
|
===========================================================================
|
|
|
|
ERROR: ${QMAILDIR} exists and is non-empty.
|
|
|
|
Please remove or rename it, then try again.
|
|
|
|
===========================================================================
|
|
EOF
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
if ${ECHO} ${QMAIL_QUEUE_DIR} | ${GREP} -q "^${QMAILDIR}/"; then
|
|
${CAT} <<EOF
|
|
===========================================================================
|
|
|
|
ERROR: QMAIL_QUEUE_DIR must not be under ${QMAILDIR}.
|
|
|
|
Please adjust your definition of QMAIL_QUEUE_DIR, then try again.
|
|
|
|
===========================================================================
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
# keep in sync with Makefile:pre-install
|
|
${LN} -s ${PKG_SYSCONFDIR}/alias ${QMAILDIR}/alias
|
|
${LN} -s ${PREFIX}/bin ${QMAILDIR}/bin
|
|
${LN} -s ${EGDIR}/boot ${QMAILDIR}/boot
|
|
${LN} -s ${PKG_SYSCONFDIR}/control ${QMAILDIR}/control
|
|
${LN} -s ${DOCDIR} ${QMAILDIR}/doc
|
|
${LN} -s ${PREFIX}/${PKGMANDIR} ${QMAILDIR}/man
|
|
${LN} -s ${QMAIL_QUEUE_DIR} ${QMAILDIR}/queue
|
|
${LN} -s ${PKG_SYSCONFDIR}/users ${QMAILDIR}/users
|
|
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
if ! [ -z ${QMAIL_QUEUE_EXTRA} ]; then
|
|
${CAT} <<EOF
|
|
===========================================================================
|
|
|
|
NOTE: Before using qmail, create a .qmail file corresponding with the local
|
|
user or alias "${QMAIL_QUEUE_EXTRA}" that meets the requirements for
|
|
QUEUE_EXTRA.
|
|
|
|
===========================================================================
|
|
EOF
|
|
fi
|
|
|
|
SERVERCERT=${PKG_SYSCONFDIR}/control/servercert.pem
|
|
if ! [ -z ${OPENSSL} ] && ! [ -s ${SERVERCERT} ]; then
|
|
${CAT} <<EOF
|
|
===========================================================================
|
|
|
|
NOTE: If you don't already have an SSL certificate for qmail:
|
|
|
|
# ${OPENSSL} req -new -x509 -nodes -days 366 -out ${SERVERCERT} -keyout ${SERVERCERT}
|
|
# chmod 640 ${SERVERCERT}
|
|
# chown qmaild:qmail ${SERVERCERT}
|
|
# ln -s ${SERVERCERT} ${PKG_SYSCONFDIR}/control/clientcert.pem
|
|
# update_tmprsadh
|
|
|
|
===========================================================================
|
|
EOF
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|