ports/88121: [MAINTAINER] mail/bogofilter: contrib/ overhaul
Matthias Andree
matthias.andree at gmx.de
Fri Oct 28 10:10:18 UTC 2005
>Number: 88121
>Category: ports
>Synopsis: [MAINTAINER] mail/bogofilter: contrib/ overhaul
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 28 10:10:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Matthias Andree
>Release: FreeBSD 4.11-RELEASE-p13 i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 4.11-RELEASE-p13 FreeBSD 4.11-RELEASE-p13 #2: Mon Oct 24 12:35:08 CEST 2005
>Description:
- update contrib/ to match upstream
- fix up bash-isms from contrib/randomtrain (patch), that should be the last bash-ism in contrib/
(also fixed in upcoming upstream 0.96.4 release)
- drop bash from RUN_DEPENDS
- drop BASH from OPTIONS.
Added file(s):
- files/patch-bashisms
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- bogofilter-0.96.3_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/Makefile /usr/home/emma/ports/mail/bogofilter/Makefile
--- /usr/ports/mail/bogofilter/Makefile Fri Oct 28 11:07:24 2005
+++ /usr/home/emma/ports/mail/bogofilter/Makefile Fri Oct 28 11:30:18 2005
@@ -7,7 +7,7 @@
PORTNAME= bogofilter
PORTVERSION= 0.96.3
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,8 +15,7 @@
MAINTAINER?= matthias.andree at gmx.de
COMMENT= Fast, teachable, learning spam detector
-OPTIONS= BASH "Install scripts that depend on the bash(1) shell" on
-OPTIONS+= GSL "Link with system-wide GSL dynamically (recommended)" on
+OPTIONS= GSL "Link with system-wide GSL dynamically (recommended)" on
OPTIONS+= UNICODE "Normalize tokens to Unicode (UTF-8)" on
LIB_DEPENDS?= db-4.3:${PORTSDIR}/databases/db43
@@ -31,10 +30,6 @@
.include <bsd.port.pre.mk>
-.if !defined(WITHOUT_BASH)
-RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash
-.endif
-
BF_LIBS?= -ldb-4.3
BF_CPPFLAGS?= -I${LOCALBASE}/include/db43 -I${LOCALBASE}/include
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
@@ -57,10 +52,6 @@
bf_copy.1 bf_compact.1 bf_tar.1
post-patch:
- ${REINPLACE_CMD} -e "s|/bin/bash|${LOCALBASE}/bin/bash|" \
- ${WRKSRC}/contrib/randomtrain \
- ${WRKSRC}/contrib/scramble \
- ${WRKSRC}/contrib/trainbogo.sh
${REINPLACE_CMD} -e 's|^#!.*perl|#! ${PERL}|' \
${WRKSRC}/src/tests/unsort.pl \
${WRKSRC}/contrib/bfproxy \
@@ -98,27 +89,25 @@
doc/bogofilter-faq.html doc/bogofilter-faq-fr.html
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
- ${INSTALL_DATA} ${WRKSRC}/trio/AUTHORS ${DOCSDIR}/AUTHORS.trio
-.for i in contrib/dot-qmail-bogofilter-default
- ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/${i}
+.for i in README.randomtrain README.contrib
+ ${INSTALL_DATA} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/${i}
.endfor
+ ${INSTALL_DATA} ${WRKSRC}/trio/AUTHORS ${DOCSDIR}/AUTHORS.trio
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}/html
${INSTALL_DATA} ${WRKSRC}/doc/*.xml ${DOCSDIR}/xml
${INSTALL_DATA} ${WRKSRC}/doc/programmer/README.freebsd ${DOCSDIR}/programmer
.endif
- ${INSTALL_PROGRAM} ${WRKSRC}/contrib/bogogrep ${DOCSDIR}/contrib/
-.for i in contrib/bogo.R contrib/bogofilter-qfe \
- contrib/mime.get.rfc822 contrib/printmaildir.pl \
- contrib/bogominitrain.pl contrib/README.contrib \
- contrib/bfproxy contrib/spamitarium contrib/stripsearch
- ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${DOCSDIR}/${i}
+ ${INSTALL_PROGRAM} ${WRKSRC}/contrib/bogogrep ${PREFIX}/bin/
+.for i in bfproxy bogofilter-milter.pl bogo.R bogofilter-qfe \
+ mime.get.rfc822 parmtest.sh printmaildir.pl \
+ bogominitrain.pl \
+ randomtrain scramble spamitarium stripsearch trainbogo.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/${i}
.endfor
-.if !defined(WITHOUT_BASH)
-.for i in randomtrain scramble trainbogo.sh
- ${INSTALL_SCRIPT} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/
+.for i in dot-qmail-bogofilter-default \
+ mailfilter.example procmailrc.example
+ ${INSTALL_DATA} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/${i}
.endfor
- ${INSTALL_DATA} ${WRKSRC}/contrib/README.randomtrain ${DOCSDIR}/contrib/
-.endif
${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/files/patch-bashisms /usr/home/emma/ports/mail/bogofilter/files/patch-bashisms
--- /usr/ports/mail/bogofilter/files/patch-bashisms Thu Jan 1 01:00:00 1970
+++ /usr/home/emma/ports/mail/bogofilter/files/patch-bashisms Fri Oct 28 11:17:13 2005
@@ -0,0 +1,79 @@
+--- ./contrib/randomtrain~ 2005/10/26 22:05:55 1.1
++++ ./contrib/randomtrain 2005/10/27 07:54:15 1.2
+@@ -4,15 +4,17 @@
+ #
+ # randomtrain -- bogofilter messages from files in random order
+ # and train if the result is wrong or uncertain
+-# needs: bash basename rm grep awk wc perl dd bogofilter
++# needs: POSIX compliant sh, basename rm grep awk wc perl dd bogofilter
+ # usage: see function usage() of this file
+ #
+ # original author: Greg Louis <glouis at dynamicro.on.ca>
+ # modified by: David Relson <relson at osagesoftware.com>
+
++# Note: on Solaris, use /usr/xpg4/bin/sh -- /bin/sh will not work.
++
+ BOGOFILTER="bogofilter"
+
+-function usage() {
++usage() {
+ name=$(basename $0)
+ echo "Usage: $name [-d bogodir] [-p pid] [-c cfg] [-]n|s filename [-]n|s filename [...]"
+ echo " Messages contained in the files are fed to bogofilter"
+@@ -34,7 +36,7 @@
+ exit 1
+ }
+
+-function train_mbox() {
++train_mbox() {
+ # go through the list, extract the messages, eval with bogofilter
+ # and train if bogofilter is wrong or uncertain
+ cnt=0; nspam=0; ngood=0; rspam=0; rgood=0;
+@@ -63,7 +65,7 @@
+ printf "\r%5d%5d %5d%5d\n" $nspam $rspam $ngood $rgood
+ }
+
+-function train_maildir() {
++train_maildir() {
+ # go through the list, extract the messages, eval with bogofilter
+ # and train if bogofilter is wrong or uncertain
+ cnt=0; nspam=0; ngood=0; rspam=0; rgood=0;
+@@ -103,9 +105,9 @@
+ mdir=2 # maildir mode
+
+ while [ ${#*} -gt 1 ]; do
+- indic=${1:0-1:1} ; shift
++ indic=$1 ; shift
+ case "$indic" in
+- s | n )
++ s|-s|n|-n)
+ path=$1 ; shift
+ cmd="$cmd -c $indic $path"
+ if [ ! -r $path ]; then echo "file '$path' not found"; usage; fi
+@@ -118,22 +120,22 @@
+ fi
+ fi
+ ;;
+- c )
++ c|-c)
+ file=$1 ; shift
+ cfg="-c $file"
+ if [ ! -r $file ]; then echo "file '$file' not found"; usage; fi
+ ;;
+- p )
++ p|-p)
+ pid=$1; shift;
+ ;;
+- d )
++ d|-d)
+ [ -n "$bogodir" ] && usage
+ bogodir=$1 ; shift
+ if [ ! -d $bogodir ]; then echo "directory '$bogodir' not found"; usage; fi
+ [ ! -f $bogodir/spamlist.db ] && $BOGOFILTER -d $bogodir -s -C < /dev/null
+ [ ! -f $bogodir/goodlist.db ] && $BOGOFILTER -d $bogodir -n -C < /dev/null
+ ;;
+- * )
++ *)
+ usage
+ esac
+ done
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/pkg-plist /usr/home/emma/ports/mail/bogofilter/pkg-plist
--- /usr/ports/mail/bogofilter/pkg-plist Wed Oct 26 21:44:36 2005
+++ /usr/home/emma/ports/mail/bogofilter/pkg-plist Fri Oct 28 11:37:01 2005
@@ -2,6 +2,7 @@
bin/bf_copy
bin/bf_tar
bin/bogofilter
+bin/bogogrep
bin/bogolexer
bin/bogotune
bin/bogoutil
@@ -9,17 +10,19 @@
etc/bogofilter.cf.example
%%CONTRIB%%%%DOCSDIR%%/contrib/bfproxy
%%CONTRIB%%%%DOCSDIR%%/contrib/bogo.R
+%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-milter.pl
%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-qfe
+%%CONTRIB%%%%DOCSDIR%%/contrib/bogominitrain.pl
+%%CONTRIB%%%%DOCSDIR%%/contrib/dot-qmail-bogofilter-default
+%%CONTRIB%%%%DOCSDIR%%/contrib/mailfilter.example
%%CONTRIB%%%%DOCSDIR%%/contrib/mime.get.rfc822
+%%CONTRIB%%%%DOCSDIR%%/contrib/parmtest.sh
%%CONTRIB%%%%DOCSDIR%%/contrib/printmaildir.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogominitrain.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/README.contrib
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogogrep
+%%CONTRIB%%%%DOCSDIR%%/contrib/procmailrc.example
%%CONTRIB%%%%DOCSDIR%%/contrib/randomtrain
%%CONTRIB%%%%DOCSDIR%%/contrib/scramble
%%CONTRIB%%%%DOCSDIR%%/contrib/spamitarium
%%CONTRIB%%%%DOCSDIR%%/contrib/stripsearch
%%CONTRIB%%%%DOCSDIR%%/contrib/trainbogo.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/README.randomtrain
%%CONTRIB%%@dirrm %%DOCSDIR%%/contrib
%%CONTRIB%%@dirrm %%DOCSDIR%%
--- bogofilter-0.96.3_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list