abiword: add 2.8.3
[openembedded.git] / recipes / bogofilter / bogofilter_0.96.6.bb
1 SECTION = "console/network"
2 DEPENDS = "virtual/db"
3 RDEPENDS = "glibc-gconv glibc-gconv-iso8859-1"
4 DESCRIPTION = "Bogofilter is a mail filter that classifies mail as spam or ham (non-spam) \
5 by a statistical analysis of the message's header and content (body). \
6 The program is able to learn from the user's classifications and corrections."
7 LICENSE = "GPL"
8 PR = "r8"
9 PRIORITY = "optional"
10
11 SRC_URI = "http://launchpad.net/bogofilter/main/0.96.6/+download/bogofilter-0.96.6.tar.gz;name=src \
12            file://configure.ac.patch;patch=1 \
13            file://volatiles \
14            file://postfix-filter.sh \
15            file://bogohelper.sh "
16 SRC_URI[src.md5sum] = "7e8e9593662f6394a56f99f12f525d6e"
17 SRC_URI[src.sha256sum] = "0b12fdd5b0bc50b582327764ee5cd415809db6d7adc233f1801bc0d0bf435a6d"
18
19
20 inherit autotools
21
22 EXTRA_OECONF = "--with-libdb-prefix=${libdir}"
23
24 do_install_append () {
25         mkdir -p ${D}${sysconfdir}/default/volatiles
26         install -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/01_bogofilter
27         install -m 755 ${WORKDIR}/postfix-filter.sh ${D}${bindir}/postfix-filter.sh
28         install -m 755 ${WORKDIR}/bogohelper.sh ${D}${bindir}/bogohelper.sh
29 }
30
31 pkg_postinst () {
32         grep filter /etc/group || addgroup filter
33         grep spam /etc/passwd || adduser --disabled-password --home=/var/spool/filter --ingroup filter -g "Bogofilter" spam
34         grep bogo /etc/passwd || adduser --disabled-password --home=/home/bogo --ingroup filter -g "Bogofilter" bogo
35         [ -f "/etc/postfix/master.cf" ] && grep "/usr/bin/postfix-filter.sh" /etc/postfix/master.cf || {
36           echo "bogofilter unix -       n       n       -       -       pipe" >> /etc/postfix/master.cf
37           echo "  flags=R user=bogo argv=/usr/bin/postfix-filter.sh -f ${sender} -- ${recipient}" >> /etc/postfix/master.cf
38           }
39         /etc/init.d/populate-volatile.sh update
40 }