diff --git a/mail/bayespam/Makefile b/mail/bayespam/Makefile index 4b2dda5c3ae5..f2770fca135a 100644 --- a/mail/bayespam/Makefile +++ b/mail/bayespam/Makefile @@ -1,46 +1,46 @@ # Created by: Mario Sergio Fujikawa Ferreira # $FreeBSD$ PORTNAME= bayespam PORTVERSION= 0.9.2 PORTREVISION= 1 CATEGORIES= mail -MASTER_SITES= http://www.garyarnold.com/sites/default/files/ +MASTER_SITES= http://BSDforge.com/projects/source/mail/bayespam/ EXTRACT_SUFX= .tar_.gz -MAINTAINER= ports@FreeBSD.org -COMMENT= qmail spam filter written in Perl using Bayesian classification +MAINTAINER= portmaster@BSDforge.com +COMMENT= Qmail spam filter written in Perl using Bayesian classification -BROKEN= unfetchable +LICENSE= GPLv2 RUN_DEPENDS= p5-MIME-Tools>=0:${PORTSDIR}/mail/p5-MIME-Tools USES= shebangfix perl5 NO_BUILD= yes SHEBANG_FILES= *.pl FILES_DOCS= AUTHORS COPYING Changelog INSTALL README TODO \ qmail.sample FILES_SCRIPTS= bayes_process_email.pl bayes_spam_check.pl bayestest.pl OPTIONS_DEFINE= DOCS post-patch: # fix location of Bayesian filter @${REINPLACE_CMD} -e 's|/user/|${PREFIX}/|' ${WRKSRC}/README @${REINPLACE_CMD} -e 's|/usr/bin/|${PREFIX}/bin/|' \ ${WRKSRC}/qmail.sample @${REINPLACE_CMD} -E -e \ 's|/usr/bin/(bayes_spam_check.pl)|${PREFIX}/bin/\1|' \ ${WRKSRC}/bayestest.pl do-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${FILES_DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/Bayespam ${INSTALL_DATA} ${WRKSRC}/Bayespam/Process.pm \ ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/Bayespam ${INSTALL_SCRIPT} ${FILES_SCRIPTS:S|^|${WRKSRC}/|} ${STAGEDIR}${PREFIX}/bin .include diff --git a/mail/bayespam/files/patch-bayes_process_email.pl b/mail/bayespam/files/patch-bayes_process_email.pl index 2e6e3f7b574f..28516ae30069 100644 --- a/mail/bayespam/files/patch-bayes_process_email.pl +++ b/mail/bayespam/files/patch-bayes_process_email.pl @@ -1,27 +1,27 @@ ---- bayes_process_email.pl.orig Sun Sep 8 16:48:05 2002 -+++ bayes_process_email.pl Sun Sep 8 16:48:28 2002 -@@ -6,6 +6,7 @@ +--- bayes_process_email.pl.orig 2016-01-17 18:02:48 UTC ++++ bayes_process_email.pl +@@ -6,6 +6,7 @@ use MIME::Parser; use Fcntl; use DB_File; +use vars qw($number_of_messages %token_occurrences); use Bayespam::Process; # -@@ -165,8 +166,6 @@ +@@ -165,8 +166,6 @@ untie( %token_ratings ); # dashes, and dollar signs -- words, in other words. sub ProcessDirectory { - our $number_of_messages; - our %token_occurrences; my $directory = shift(@_); local *number_of_messages = shift(@_); local *token_occurrences = shift(@_); -@@ -227,7 +226,6 @@ +@@ -227,7 +226,6 @@ sub ProcessDirectory # dashes, and dollar signs -- words, in other words. sub ProcessFile { - our %token_occurrences; my $file = shift(@_); local *token_occurrences = shift(@_); diff --git a/mail/bayespam/files/patch-bayes_spam_check.pl b/mail/bayespam/files/patch-bayes_spam_check.pl index ab983b852f76..da65188bee84 100644 --- a/mail/bayespam/files/patch-bayes_spam_check.pl +++ b/mail/bayespam/files/patch-bayes_spam_check.pl @@ -1,12 +1,11 @@ ---- bayes_spam_check.pl.orig Sun Sep 8 17:06:34 2002 -+++ bayes_spam_check.pl Sun Sep 8 17:06:40 2002 -@@ -144,7 +144,7 @@ +--- bayes_spam_check.pl.orig 2016-01-17 18:02:48 UTC ++++ bayes_spam_check.pl +@@ -144,7 +144,7 @@ Given a corpus rating file and an email -h, --help : this (help) message -r, --rating : corpus rating file to use -example: $0 --rating -o bayes_rating.dat +example: $0 --rating bayes_rating.dat EOF --} -+} + } diff --git a/mail/bayespam/pkg-descr b/mail/bayespam/pkg-descr index 5b2c705c2765..ba27a8d1c685 100644 --- a/mail/bayespam/pkg-descr +++ b/mail/bayespam/pkg-descr @@ -1,15 +1,13 @@ -[ excerpt from developer's site ] - Bayespam is a qmail spam filter written in Perl, using Bayesian classification to filter out unsolicited commercial email. It is written with ease of installation and use in mind, and it is encouraged that you give it a try. Bayespam actually learns as you give it more spam to process, so it should become better and better the longer you use it. Bayespam is based on a paper written by Paul Graham called A Plan for Spam. In this paper, Mr. Graham talked about a spam filter he is working on that used Bayesian classification to determine if a particular piece of email is spam or not. -WWW: http://www.garyarnold.com/Bayespam +WWW: http://BSDforge.com/projects/mail/bayespam