diff options
author | Vasilis Papavasileiou <el03020@mail.ntua.gr> | 2010-05-11 15:01:26 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 15:01:26 +0200 |
commit | cda52fff1a8614fc976440dba163949e563094f9 (patch) | |
tree | a2038703e3c80931ac346e3338b3400d11dcbd96 /network | |
parent | 7307b31029eb1b74e3725e8cada8e25148728ad4 (diff) | |
download | slackbuilds-cda52fff1a8614fc976440dba163949e563094f9.tar.gz |
network/bogofilter: Initial import
Diffstat (limited to 'network')
-rw-r--r-- | network/bogofilter/README | 15 | ||||
-rw-r--r-- | network/bogofilter/bogofilter.SlackBuild | 64 | ||||
-rw-r--r-- | network/bogofilter/bogofilter.info | 8 | ||||
-rw-r--r-- | network/bogofilter/doinst.sh | 15 | ||||
-rw-r--r-- | network/bogofilter/slack-desc | 11 |
5 files changed, 113 insertions, 0 deletions
diff --git a/network/bogofilter/README b/network/bogofilter/README new file mode 100644 index 0000000000..ac5a9bebc6 --- /dev/null +++ b/network/bogofilter/README @@ -0,0 +1,15 @@ +Bogofilter is a Bayesian spam filter. In its normal mode of operation, it +takes an email message or other text on standard input, does a statistical +check against lists of "good" and "bad" words, and returns a status code +indicating whether or not the message is spam. Bogofilter is designed with +fast algorithms (including Berkeley DB system), coded directly in C, and tuned +for speed, so it can be used for production by sites that process a lot of +mail. + +Bogofilter can be built with different database backends. Default is +Berkeley DB available in Slackware (db44 and older versions). You can use +sqlite3 instead, available from slackbuilds.org, by setting the DATABASE +environment variable. + +Once the package is installed, there is good documentation available in +the standard location. diff --git a/network/bogofilter/bogofilter.SlackBuild b/network/bogofilter/bogofilter.SlackBuild new file mode 100644 index 0000000000..961ca82c77 --- /dev/null +++ b/network/bogofilter/bogofilter.SlackBuild @@ -0,0 +1,64 @@ +#!/bin/sh + +# Slackware build script for bogofilter +# Written by Vasilis Papavasileiou <el03020 at mail dot ntua dot gr> +# Modified by the SlackBuilds.org project +# (assumed to be public domain per our submission policy) + +PRGNAM=bogofilter +VERSION=1.1.5 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +DOCS="AUTHORS COPYING GETTING.STARTED INSTALL NEWS* RELEASE.NOTES TODO \ + doc/*.html doc/README* doc/integrating*" + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP || exit 1 +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Set the DATABASE environment variable for a different backend (eg. sqlite3) +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --with-database=${DATABASE:-db} \ + || exit 1 + +make || exit 1 +make install DESTDIR=$PKG || exit 1 + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man ; find . -type f -exec gzip -9 {} \; ) + +mv $PKG/etc/$PRGNAM.cf.example $PKG/etc/$PRGNAM.cf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/bogofilter/bogofilter.info b/network/bogofilter/bogofilter.info new file mode 100644 index 0000000000..96d3f468a7 --- /dev/null +++ b/network/bogofilter/bogofilter.info @@ -0,0 +1,8 @@ +PRGNAM="bogofilter" +VERSION="1.1.5" +HOMEPAGE="http://bogofilter.sourceforge.net" +DOWNLOAD="http://prdownloads.sourceforge.net/bogofilter/bogofilter-1.1.5.tar.gz" +MD5SUM="25558e2e72350ee2e4edfc1b617f6738" +MAINTAINER="Vasilis Papavasileiou" +EMAIL="el03020@mail.ntua.gr" +APPROVED="rworkman" diff --git a/network/bogofilter/doinst.sh b/network/bogofilter/doinst.sh new file mode 100644 index 0000000000..812c07712d --- /dev/null +++ b/network/bogofilter/doinst.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/bogofilter.cf.new diff --git a/network/bogofilter/slack-desc b/network/bogofilter/slack-desc new file mode 100644 index 0000000000..dac209a824 --- /dev/null +++ b/network/bogofilter/slack-desc @@ -0,0 +1,11 @@ +bogofilter: bogofilter (bayesian spam filter) +bogofilter: +bogofilter: Bogofilter is a Bayesian spam filter. In its normal mode of +bogofilter: operation, it takes an email message or other text on standard +bogofilter: input, does a statistical check against lists of "good" and "bad" +bogofilter: words, and returns a status code indicating whether or not the +bogofilter: message is spam. +bogofilter: +bogofilter: Homepage: http://bogofilter.sourceforge.net +bogofilter: +bogofilter: |