fadd3f4ce3
For ${OPSYS}/${USE_DESTDIR}/${PKGMANDIR} combinations that already worked, no functional change (hence no PKGREVISION bump).
79 lines
2.1 KiB
Text
79 lines
2.1 KiB
Text
# $NetBSD: INSTALL,v 1.5 2011/06/07 02:53:42 schmonz Exp $
|
|
|
|
DOCDIR=@DOCDIR@
|
|
EGDIR=@EGDIR@
|
|
PKGMANDIR=@PKGMANDIR@
|
|
QMAILDIR=@QMAILDIR@
|
|
QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@
|
|
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
|
|
VIRUSCAN_SIGS_SRCFILE=@VIRUSCAN_SIGS_SRCFILE@
|
|
|
|
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
|
|
if ! [ -z ${VIRUSCAN_SIGS_SRCFILE} ] && \
|
|
! [ -s ${PKG_SYSCONFDIR}/control/signatures ]; then
|
|
${SED} -e '1,15d' -e '34,$d' \
|
|
< ${VIRUSCAN_SIGS_SRCFILE} \
|
|
> ${PKG_SYSCONFDIR}/control/signatures
|
|
${CHMOD} 644 ${PKG_SYSCONFDIR}/control/signatures
|
|
fi
|
|
|
|
|
|
;;
|
|
|
|
esac
|