diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-09-09 03:02:16 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-09-09 03:02:16 +0000 |
commit | 896ccafe996b72d4cd1f9fdbf986b9a5fc00a972 (patch) | |
tree | 8a124af746da82f0c3d424f6794deb4be718e26c /mail/bayespam | |
parent | d183abc1597e69b5908742cc709aa2552cc3d470 (diff) | |
download | ports-896ccafe996b72d4cd1f9fdbf986b9a5fc00a972.tar.gz ports-896ccafe996b72d4cd1f9fdbf986b9a5fc00a972.zip |
Notes
Diffstat (limited to 'mail/bayespam')
-rw-r--r-- | mail/bayespam/Makefile | 50 | ||||
-rw-r--r-- | mail/bayespam/distinfo | 1 | ||||
-rw-r--r-- | mail/bayespam/files/patch-bayes_process_email.pl | 27 | ||||
-rw-r--r-- | mail/bayespam/files/patch-bayes_spam_check.pl | 12 | ||||
-rw-r--r-- | mail/bayespam/pkg-comment | 1 | ||||
-rw-r--r-- | mail/bayespam/pkg-descr | 15 | ||||
-rw-r--r-- | mail/bayespam/pkg-plist | 13 |
7 files changed, 119 insertions, 0 deletions
diff --git a/mail/bayespam/Makefile b/mail/bayespam/Makefile new file mode 100644 index 000000000000..d870c2b8dd39 --- /dev/null +++ b/mail/bayespam/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: bayespam +# Date created: Sun Sep 8 16:15:26 UTC 2002 +# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= bayespam +PORTVERSION= 0.9.2 +CATEGORIES= mail +MASTER_SITES= http://www.garyarnold.com/projects/ + +MAINTAINER= lioux@FreeBSD.org + +RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/MIME/Parser.pm:${PORTSDIR}/mail/p5-MIME-Tools + +USE_PERL5= yes +USE_REINPLACE= yes +NO_BUILD= yes + +FILES_DOCS= AUTHORS COPYING Changelog INSTALL README TODO \ + qmail.sample +FILES_SCRIPTS= bayes_process_email.pl bayes_spam_check.pl bayestest.pl + +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 +# fix location of PERL + @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/*.pl + +do-install: +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for file in ${FILES_DOCS} + ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} +.endfor +.endif + @${MKDIR} ${PREFIX}/lib/perl5/site_perl/${PERL_VER}/Bayespam + @${INSTALL_DATA} ${WRKSRC}/Bayespam/Process.pm \ + ${PREFIX}/lib/perl5/site_perl/${PERL_VER}/Bayespam +.for file in ${FILES_SCRIPTS} + @${INSTALL_SCRIPT} ${WRKSRC}/${file} ${PREFIX}/bin +.endfor + +.include <bsd.port.mk> diff --git a/mail/bayespam/distinfo b/mail/bayespam/distinfo new file mode 100644 index 000000000000..66664e3eebe1 --- /dev/null +++ b/mail/bayespam/distinfo @@ -0,0 +1 @@ +MD5 (bayespam-0.9.2.tar.gz) = fc9686726b8268beb1f4732925bb7965 diff --git a/mail/bayespam/files/patch-bayes_process_email.pl b/mail/bayespam/files/patch-bayes_process_email.pl new file mode 100644 index 000000000000..2e6e3f7b574f --- /dev/null +++ b/mail/bayespam/files/patch-bayes_process_email.pl @@ -0,0 +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 @@ + use Fcntl; + use DB_File; + ++use vars qw($number_of_messages %token_occurrences); + use Bayespam::Process; + + # +@@ -165,8 +166,6 @@ + # 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 @@ + # 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 new file mode 100644 index 000000000000..ab983b852f76 --- /dev/null +++ b/mail/bayespam/files/patch-bayes_spam_check.pl @@ -0,0 +1,12 @@ +--- 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 @@ + -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-comment b/mail/bayespam/pkg-comment new file mode 100644 index 000000000000..4b085d511d23 --- /dev/null +++ b/mail/bayespam/pkg-comment @@ -0,0 +1 @@ +qmail spam filter written in Perl using Bayesian classification diff --git a/mail/bayespam/pkg-descr b/mail/bayespam/pkg-descr new file mode 100644 index 000000000000..80bf597dc6a9 --- /dev/null +++ b/mail/bayespam/pkg-descr @@ -0,0 +1,15 @@ +[ 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/projects.php#bayespam diff --git a/mail/bayespam/pkg-plist b/mail/bayespam/pkg-plist new file mode 100644 index 000000000000..413d0522855a --- /dev/null +++ b/mail/bayespam/pkg-plist @@ -0,0 +1,13 @@ +bin/bayes_process_email.pl +bin/bayes_spam_check.pl +bin/bayestest.pl +lib/perl5/site_perl/%%PERL_VER%%/Bayespam/Process.pm +%%PORTDOCS%%share/doc/bayespam/AUTHORS +%%PORTDOCS%%share/doc/bayespam/COPYING +%%PORTDOCS%%share/doc/bayespam/Changelog +%%PORTDOCS%%share/doc/bayespam/INSTALL +%%PORTDOCS%%share/doc/bayespam/README +%%PORTDOCS%%share/doc/bayespam/TODO +%%PORTDOCS%%share/doc/bayespam/qmail.sample +%%PORTDOCS%%@dirrm share/doc/bayespam +@dirrm lib/perl5/site_perl/%%PERL_VER%%/Bayespam |