From a7e59c50d29ff6c9e1551a70a9987cb37ea864ac Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 1 Apr 2014 22:21:18 +0200 Subject: gnu: Add Bogofilter. * gnu/packages/mail.scm (bogofilter): New variable. --- gnu/packages/mail.scm | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 703762eed3..18307048ec 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; Copyright © 2014 Mark H Weaver ;;; ;;; This file is part of GNU Guix. @@ -37,8 +37,10 @@ #:use-module (gnu packages compression) #:use-module (gnu packages glib) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages flex) + #:use-module (gnu packages bdb) #:use-module ((guix licenses) - #:select (gpl2+ gpl3+ lgpl2.1+ lgpl3+)) + #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -211,4 +213,36 @@ the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME).") (license (list lgpl2.1+ gpl2+ gpl3+)))) +(define-public bogofilter + (package + (name "bogofilter") + (version "1.2.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-" + version "/bogofilter-" + version ".tar.bz2")) + (sha256 + (base32 + "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-cons-before + 'check 'pre-check + (lambda _ + (substitute* "src/tests/t.frame" + (("GREP=/bin/grep") + (string-append "GREP=" (which "grep") "\n")))) + %standard-phases))) + (native-inputs `(("flex" ,flex))) + (inputs `(("bdb" ,bdb))) + (home-page "http://bogofilter.sourceforge.net/") + (synopsis "Mail classifier based on a Bayesian filter") + (description + "Bogofilter is a mail filter that classifies mail as spam or ham + (non-spam) by a statistical analysis of the message's header and +content (body). The program is able to learn from the user's classifications +and corrections. It is based on a Bayesian filter.") + (license gpl2))) + ;;; mail.scm ends here -- cgit v1.2.3