# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                bogofilter
version             1.2.5
revision            2
checksums           rmd160  6ae8e8e9b69308e8f9afdd7dd35364eddbed6211 \
                    sha256  3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea \
                    size    801240

categories          mail
license             GPL-2
maintainers         nomaintainer

description         Fast Bayesian Spam Filter
long_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.

homepage            https://bogofilter.sourceforge.io/
master_sites        sourceforge:project/bogofilter/bogofilter-stable/
use_xz              yes

depends_lib         port:sqlite3 \
                    port:libiconv \
                    port:gsl

patchfiles          configure.patch

configure.args      --with-libsqlite3-prefix=${prefix} \
                    --with-libiconv-prefix=${prefix} \
                    --with-gsl-prefix=${prefix} \
                    --with-database=sqlite3 \
                    --without-libdb-prefix \
                    --without-libqdbm-prefix \
                    --mandir=${prefix}/share/man

post-destroot   {
    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING GETTING.STARTED INSTALL \
        NEWS README RELEASE.NOTES TODO ${destroot}${prefix}/share/doc/${name}
}

# skip release candidates
livecheck.regex     "/${name}-(\\d+(?:\\.\\d+)*)\\.tar"
