1) Fix bug introduced in Makefile rev 1.29: files/maildir not

replacing @PREFIX@ with ${PREFIX}
2) Rewrite rc script patching to both handle more cases and
   fix (1). Mostly within thereal-post-patch target
3) Update files/maildir both due to (2) and to resemble the rc
   scripts supplied with the qmail distribution

Prompted by:	Thomas Sarlandie <sarfata@altern.org>
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2001-05-26 03:27:55 +00:00
parent 5bc18049fe
commit 1a32f86a3f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43069
2 changed files with 11 additions and 17 deletions

View File

@ -245,7 +245,9 @@ do-install:
@cd ${WRKSRC} ; ./install
${INSTALL_PROGRAM} ${CONFIGUREPROGS} ${PREFIX}/configure
${INSTALL_SCRIPT} ${CONFIGUREFILES} ${PREFIX}/configure
${INSTALL_SCRIPT} ${BOOTFILES} ${PREFIX}/boot
.for i in ${BOOTFILES}
${INSTALL_SCRIPT} ${WRKDIR}/${i:T} ${PREFIX}/boot
.endfor
.for i in 1 5 7 8
@${MKDIR} ${PREFIX}/man/man$i
.for j in ${MAN${i}}
@ -283,9 +285,12 @@ do-install:
# Ugh... ;-)
thereal-post-patch:
.for i in ${BOOTFILES}
@if [ `dirname $i` != ${FILESDIR} ] ; \
@if [ -f ${i}.sh ] ; \
then \
${PERL} -pi.orig -ne 's!^(exec)!case "\$$1" in\nstart)\n\t\1!;s!(qmail)$$!\1\&\n\texit 0\n\t;;\nstop)\n\texec killall qmail-send\n\t;;\n*)\n\t${ECHO} "Usage: `basename \$$0` {start|stop}" >&2\n\texit 64\n\t;;\nesac!' $i.sh ; \
${PERL} -p -ne 's!QMAIL/!${PREFIX}/!;s!^(exec)!case "\$$1" in\nstart)\n\t\1!;s!(qmail)$$!\1\&\n\texit 0\n\t;;\nstop)\n\texec killall qmail-send\n\t;;\n*)\n\t${ECHO} "Usage: `basename \$$0` {start|stop}" >&2\n\texit 64\n\t;;\nesac!' $i.sh > ${WRKDIR}/${i:T} ; \
elif [ -f ${i} ] ; \
then \
${PERL} -p -ne 's!QMAIL/!${PREFIX}/!;s!^(exec)!case "\$$1" in\nstart)\n\t\1!;s!(qmail)$$!\1\&\n\texit 0\n\t;;\nstop)\n\texec killall qmail-send\n\t;;\n*)\n\t${ECHO} "Usage: `basename \$$0` {start|stop}" >&2\n\texit 64\n\t;;\nesac!' $i > ${WRKDIR}/${i:T} ; \
fi
.endfor
@${SED} s!/var/qmail/!${PREFIX}/!g ${FILESDIR}/mailer.conf.sample > \

View File

@ -3,17 +3,6 @@
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to Maildir format by default
case "$1" in
start)
exec env - PATH="@PREFIX@/qmail/bin:$PATH" \
qmail-start ./Maildir/ splogger qmail&
exit 0
;;
stop)
exec killall qmail-send
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 64
;;
esac
exec env - PATH="QMAIL/bin:$PATH" \
qmail-start ./Maildir/ \
splogger qmail