summaryrefslogtreecommitdiff
path: root/mail/qmqtool
diff options
context:
space:
mode:
authorschmonz <schmonz>2007-01-18 06:35:24 +0000
committerschmonz <schmonz>2007-01-18 06:35:24 +0000
commit5d7e3bda5e8d023805005cb383b721b0eb36ef29 (patch)
treee5bda2619762a9ef7057fea2a0afb28e84bd61ca /mail/qmqtool
parentc60466da923d1769b99536506329f516dd935965 (diff)
downloadpkgsrc-5d7e3bda5e8d023805005cb383b721b0eb36ef29.tar.gz
Initial import of qmqtool, a qmail queue manipulation program geared
towards the viewing and safe modification of the contents in a qmail queue. qmqtool was designed with Michele Beltrame's "qmHandle" in mind, however no source code from qmHandle was used within qmqtool.
Diffstat (limited to 'mail/qmqtool')
-rw-r--r--mail/qmqtool/DESCR9
-rw-r--r--mail/qmqtool/Makefile37
-rw-r--r--mail/qmqtool/PLIST16
-rw-r--r--mail/qmqtool/distinfo6
-rw-r--r--mail/qmqtool/patches/patch-aa54
5 files changed, 122 insertions, 0 deletions
diff --git a/mail/qmqtool/DESCR b/mail/qmqtool/DESCR
new file mode 100644
index 00000000000..32393f8b4cf
--- /dev/null
+++ b/mail/qmqtool/DESCR
@@ -0,0 +1,9 @@
+qmqtool is a qmail queue manipulation program geared towards the
+viewing and safe modification of the contents in a qmail queue.
+
+qmqtool was designed with Michele Beltrame's "qmHandle" in mind,
+however no source code from qmHandle was used within qmqtool.
+
+qmqtool is significantly faster than qmHandle 1.2.0 on the author's
+system, even though it has more work to do (such as examining the
+todo queue).
diff --git a/mail/qmqtool/Makefile b/mail/qmqtool/Makefile
new file mode 100644
index 00000000000..947680d09e2
--- /dev/null
+++ b/mail/qmqtool/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+#
+
+DISTNAME= qmqtool-current
+PKGNAME= ${DISTNAME:S/-current/-1.13/}
+CATEGORIES= mail
+MASTER_SITES= ${HOMEPAGE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= schmonz@NetBSD.org
+HOMEPAGE= http://jeremy.kister.net/code/qmqtool/
+COMMENT= View and safely modify qmail queue
+
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
+USE_LANGUAGES= # none
+USE_TOOLS+= perl:run
+NO_BUILD= yes
+REPLACE_PERL= qmqtool
+SPECIAL_PERMS+= ${PREFIX}/sbin/qmqtool ${ROOT_USER} ${ROOT_GROUP} 0700
+
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= ${WRKSRC}/qmqtool
+SUBST_SED.paths+= -e 's,@QMAILDIR@,${QMAILDIR:Q},g'
+SUBST_SED.paths+= -e 's,@PS@,${PS},g'
+SUBST_SED.paths+= -e 's,@GREP@,${GREP},g'
+SUBST_SED.paths+= -e 's,@RCD_SCRIPTS_DIR@,${RCD_SCRIPTS_DIR},g'
+SUBST_STAGE.paths= do-configure
+
+INSTALLATION_DIRS= sbin share/doc/qmqtool share/examples/qmqtool
+
+do-install:
+ cd ${WRKSRC}; \
+ cp qmqtool ${PREFIX}/sbin; \
+ cp Artistic ChangeLog FAQ README ${PREFIX}/share/doc/qmqtool; \
+ cp -Rp contrib ${PREFIX}/share/examples/qmqtool
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/qmqtool/PLIST b/mail/qmqtool/PLIST
new file mode 100644
index 00000000000..e000215cc6d
--- /dev/null
+++ b/mail/qmqtool/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+sbin/qmqtool
+share/doc/qmqtool/Artistic
+share/doc/qmqtool/ChangeLog
+share/doc/qmqtool/FAQ
+share/doc/qmqtool/README
+share/examples/qmqtool/contrib/argus/README
+share/examples/qmqtool/contrib/argus/config
+share/examples/qmqtool/contrib/cricket/Defaults
+share/examples/qmqtool/contrib/cricket/README
+share/examples/qmqtool/contrib/cricket/Targets
+@dirrm share/examples/qmqtool/contrib/cricket
+@dirrm share/examples/qmqtool/contrib/argus
+@dirrm share/examples/qmqtool/contrib
+@dirrm share/examples/qmqtool
+@dirrm share/doc/qmqtool
diff --git a/mail/qmqtool/distinfo b/mail/qmqtool/distinfo
new file mode 100644
index 00000000000..5728d5251d7
--- /dev/null
+++ b/mail/qmqtool/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+
+SHA1 (qmqtool-current.tgz) = c6fea8ef8324ae0ae241ff126b1da395d9b97e5c
+RMD160 (qmqtool-current.tgz) = d92dd6b9f03cea85f2e4cf69a1dd5b94afef42f2
+Size (qmqtool-current.tgz) = 19098 bytes
+SHA1 (patch-aa) = 4a15464d895afafa112d60af647d4f41f5596a24
diff --git a/mail/qmqtool/patches/patch-aa b/mail/qmqtool/patches/patch-aa
new file mode 100644
index 00000000000..bd0fb1c00b5
--- /dev/null
+++ b/mail/qmqtool/patches/patch-aa
@@ -0,0 +1,54 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+
+--- qmqtool.orig 2006-10-07 22:29:46.000000000 -0400
++++ qmqtool
+@@ -10,14 +10,10 @@ use strict;
+ use Getopt::Std;
+ my (%tool,%opt);
+
+-my $qmail = '/var/qmail';
+-$tool{'ps'} = '/bin/ps'; # full path to ps, or just ps if $PATH is sufficient
++my $qmail = '@QMAILDIR@';
++$tool{'ps'} = '@PS@'; # full path to ps, or just ps if $PATH is sufficient
+ $tool{'ps_arg'} = (`uname -s` =~ /SunOS/) ? '-ef' : 'aux'; # should statically code this
+-if(-x '/usr/local/bin/grep'){
+- $tool{'grep'} = '/usr/local/bin/grep'; # GNU grep is 5 times faster than solaris grep
+-}elsif(-x '/bin/grep'){
+- $tool{'grep'} = '/bin/grep';
+-}
++$tool{'grep'} = '@GREP@';
+
+ # must play with @ARGV directly because Getopt doesnt have a xx: (-x with or without an arg)
+ my $n = 0;
+@@ -152,6 +148,7 @@ if(defined($opt{h})){
+ }
+ unless($opt{Q}){
+ print "you must now start qmail-send: for a LWQ installation, run: svc -u /service/qmail-send\n";
++ print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend start\n";
+ }
+ }else{
+ syntax();
+@@ -409,6 +406,7 @@ sub check_qmailsend {
+ if(/^\s*qmails\s.+\sqmail-send/){
+ die "you must stop qmail-send before this program can continue\n",
+ "for a LWQ installation, run: svc -d /service/qmail-send\n",
++ "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend stop\n",
+ "others may be able to run: kill -9 `$tool{'ps'} $tool{'ps_arg'} | awk '/qmails.*qmail-send/ { print \$2 }'`\n";
+ }
+ }
+@@ -586,6 +584,7 @@ sub checkqueue {
+ print "no rogue files found\n";
+ }
+ print "you must now start qmail-send: for a LWQ installation, run: svc -u /service/qmail-send\n";
++ print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend start\n";
+ }
+
+ sub rm_files {
+@@ -624,6 +623,7 @@ sub rm_files {
+ }
+ if(defined($restart)){
+ print "you must now restart qmail-send: for a LWQ installation, run: svc -du /service/qmail-send\n";
++ print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend restart\n";
+ }
+ }
+