mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
- Split a piece of code that contain user configuration variables and create a
configuration file qmHandle.conf installed under ${PREFIX}/etc. This avoids user needs to edit qmHandle file at ${PREFIX}/bin and lost changes every upgrade - Bump PORTREVISION
This commit is contained in:
parent
ef88d27e4c
commit
b72b901790
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219309
@ -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}
|
||||
|
@ -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();
|
||||
|
50
mail/qmhandle/files/qmHandle.conf.in
Normal file
50
mail/qmhandle/files/qmHandle.conf.in
Normal file
@ -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;
|
5
mail/qmhandle/pkg-plist
Normal file
5
mail/qmhandle/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user