diff options
author | Renato Botelho <garga@FreeBSD.org> | 2008-08-27 14:24:45 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2008-08-27 14:24:45 +0000 |
commit | b72b901790d8a750fc5c7165b8c3124976d847ad (patch) | |
tree | d31cca41c4f73cea91a2c7b22adb6f99e66e5c61 /mail/qmhandle | |
parent | ef88d27e4c2280fd869bea03a49803dc7c611f74 (diff) | |
download | ports-b72b901790d8a750fc5c7165b8c3124976d847ad.tar.gz ports-b72b901790d8a750fc5c7165b8c3124976d847ad.zip |
Notes
Diffstat (limited to 'mail/qmhandle')
-rw-r--r-- | mail/qmhandle/Makefile | 14 | ||||
-rw-r--r-- | mail/qmhandle/files/patch-qmHandle | 39 | ||||
-rw-r--r-- | mail/qmhandle/files/qmHandle.conf.in | 50 | ||||
-rw-r--r-- | mail/qmhandle/pkg-plist | 5 |
4 files changed, 73 insertions, 35 deletions
diff --git a/mail/qmhandle/Makefile b/mail/qmhandle/Makefile index 7489e835285f..ec8151212d03 100644 --- a/mail/qmhandle/Makefile +++ b/mail/qmhandle/Makefile @@ -7,7 +7,7 @@ PORTNAME= qmhandle PORTVERSION= 1.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= SF @@ -20,15 +20,21 @@ NO_BUILD= yes USE_PERL5= yes USE_BZIP2= yes -PLIST_FILES= bin/qmHandle PORTDOCS= HISTORY README post-patch: - @${PERL} -pi -e 's,^#!/usr/bin/perl,#!${PERL},; \ - s,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/qmHandle + @${REINPLACE_CMD} -e 's,^#!/usr/bin/perl,#!${PERL},g' \ + -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ + -e '/^##* *USER *CONFIGURATION *BEGIN *##*$$/,/^##* *USER *CONFIGURATION *END *##*$$/s/^\(#*\)my/\1our/g' \ + ${WRKSRC}/qmHandle + @${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g' ${FILESDIR}/qmHandle.conf.in > \ + ${WRKSRC}/qmHandle.conf.sample do-install: ${INSTALL_SCRIPT} ${WRKSRC}/qmHandle ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/qmHandle.conf.sample ${PREFIX}/etc + [ -f ${PREFIX}/etc/qmHandle.conf ] || \ + ${INSTALL_DATA} -m 0644 ${WRKSRC}/qmHandle.conf.sample ${PREFIX}/etc/qmHandle.conf .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for file in ${PORTDOCS} diff --git a/mail/qmhandle/files/patch-qmHandle b/mail/qmhandle/files/patch-qmHandle index a38814cfcffd..709f1f5ed7e2 100644 --- a/mail/qmhandle/files/patch-qmHandle +++ b/mail/qmhandle/files/patch-qmHandle @@ -1,34 +1,11 @@ ---- qmHandle.orig 2007-07-20 02:03:45.000000000 -0300 -+++ qmHandle 2008-05-20 15:20:39.000000000 -0300 -@@ -26,13 +26,17 @@ - # ### Be sure to uncomment only ONE of each variable declarations ### - - # For instance, this is if you have DJB's daemontools --my ($stopqmail) = '/usr/local/bin/svc -d /service/qmail-deliver'; --my ($startqmail) = '/usr/local/bin/svc -u /service/qmail-deliver'; -+#my ($stopqmail) = '/usr/local/bin/svc -d /service/qmail-deliver'; -+#my ($startqmail) = '/usr/local/bin/svc -u /service/qmail-deliver'; - - # While this is if you have a Debian GNU/Linux with its qmail package - #my ($stopqmail) = '/etc/init.d/qmail stop'; - #my ($startqmail) = '/etc/init.d/qmail start'; - -+# This is if you have FreeBSD with its qmail package -+my ($stopqmail) = '%%LOCALBASE%%/etc/rc.d/qmail.sh stop'; -+my ($startqmail) = '%%LOCALBASE%%/etc/rc.d/qmail.sh start'; -+ - # If you don't have scripts, leave $stopqmail blank (the process will - # be hunted and killed by qmHandle): - #my ($stopqmail) = ''; -@@ -47,7 +51,10 @@ - ##### - # Enter here the system command which returns qmail PID. The following - # should work on most Unixes: --my ($pidcmd) = 'pidof qmail-send'; -+#my ($pidcmd) = 'pidof qmail-send'; -+# This is for FreeBSD with a standard qmail installation: -+my ($pidcmd) = 'pgrep qmail-send'; -+ +--- qmHandle.orig 2008-08-27 10:10:19.000000000 -0300 ++++ qmHandle 2008-08-27 10:22:20.000000000 -0300 +@@ -51,6 +51,8 @@ #################### USER CONFIGURATION END #################### ++require "%%LOCALBASE%%/etc/qmHandle.conf" if ( -f "%%LOCALBASE%%/etc/qmHandle.conf" ); ++ + # Print usage if no arguments + if ($#ARGV == -1) { + &Usage(); diff --git a/mail/qmhandle/files/qmHandle.conf.in b/mail/qmhandle/files/qmHandle.conf.in new file mode 100644 index 000000000000..24bbf8c495b9 --- /dev/null +++ b/mail/qmhandle/files/qmHandle.conf.in @@ -0,0 +1,50 @@ +################################################################## +# +# This configuration file was written using perl language +# be carefull with the sintax +# +################################################################## + +##### +# Set this to your qmail queue directory (be sure to include the final slash!) +our ($queue) = '/var/qmail/queue/'; +our ($bigtodo) = (-d "${queue}todo/0") ? 0 : 1; # 1 means no big-todo + +##### +# If your system has got automated command to start/stop qmail, then +# enter them here. +# ### Be sure to uncomment only ONE of each variable declarations ### + +# For instance, this is if you have DJB's daemontools +#our ($stopqmail) = '%%LOCALBASE%%/bin/svc -d /service/qmail-deliver'; +#our ($startqmail) = '%%LOCALBASE%%/bin/svc -u /service/qmail-deliver'; + +# While this is if you have a Debian GNU/Linux with its qmail package +#our ($stopqmail) = '/etc/init.d/qmail stop'; +#our ($startqmail) = '/etc/init.d/qmail start'; + +# This is if you have FreeBSD with its qmail package +our ($stopqmail) = '%%LOCALBASE%%/etc/rc.d/qmail.sh stop'; +our ($startqmail) = '%%LOCALBASE%%/etc/rc.d/qmail.sh start'; + +# If you don't have scripts, leave $stopqmail blank (the process will +# be hunted and killed by qmHandle): +#our ($stopqmail) = ''; + +# However, you still need to launch qmail in a way or the other. So, +# if you have a standard qmail 1.03 use this: +#our ($startqmail) = "csh -cf '/var/qmail/rc &'"; + +# While, if you have a standard qmail < 1.03 you should use this: +#our ($startqmail) = '/var/qmail/bin/qmail-start ./Mailbox splogger qmail &'; + +##### +# Enter here the system command which returns qmail PID. The following +# should work on most Unixes: +#our ($pidcmd) = 'pidof qmail-send'; + +# This is for FreeBSD with a standard qmail installation: +our ($pidcmd) = 'pgrep qmail-send'; + +################### NEVER REMOVE FOLLOWING LINE ################## +1; diff --git a/mail/qmhandle/pkg-plist b/mail/qmhandle/pkg-plist new file mode 100644 index 000000000000..c66545aeb84a --- /dev/null +++ b/mail/qmhandle/pkg-plist @@ -0,0 +1,5 @@ +@comment $FreeBSD$ +bin/qmHandle +@unexec if cmp -s %D/etc/qmHandle.conf %D/etc/qmHandle.conf.sample; then rm -f %D/etc/qmHandle.conf; fi +etc/qmHandle.conf.sample +@exec [ -f %B/qmHandle.conf ] || cp %B/%f %B/qmHandle.conf |