mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
network/bogofilter: Initial import
This commit is contained in:
parent
7307b31029
commit
cda52fff1a
5 changed files with 113 additions and 0 deletions
15
network/bogofilter/README
Normal file
15
network/bogofilter/README
Normal file
|
@ -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.
|
64
network/bogofilter/bogofilter.SlackBuild
Normal file
64
network/bogofilter/bogofilter.SlackBuild
Normal file
|
@ -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
|
8
network/bogofilter/bogofilter.info
Normal file
8
network/bogofilter/bogofilter.info
Normal file
|
@ -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"
|
15
network/bogofilter/doinst.sh
Normal file
15
network/bogofilter/doinst.sh
Normal file
|
@ -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
|
11
network/bogofilter/slack-desc
Normal file
11
network/bogofilter/slack-desc
Normal file
|
@ -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:
|
Loading…
Reference in a new issue