summaryrefslogtreecommitdiff
path: root/packages/p3scan/p3scan_2.9.05d.bb
blob: e419e2e23422486174cfbfca91ca64936566f2bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
DESCRIPTION = "A transparent proxy-server for email clients. It is designed \
to enable scanning of incoming/outgoing email messages (POP3, POPSS and \
SMTP) for Virus's, Worms, Trojans, Spam and harmfull attachments."
HOMEPAGE = "http://p3scan.sourceforge.net/"
SECTION = "network"
LICENSE = "GPLv2"
DEPENDS = "gmp bzip2 zlib clamav openssl"
RDEPENDS_${PN} = "${PN}-templates-en"
PR = "r4"

SRC_URI = "${SOURCEFORGE_MIRROR}/p3scan/p3scan-2.9.05d.tar.gz \
           file://libtool-fix.patch;patch=1 \
           file://dont-search-use-include.patch;patch=1 \
           file://configure.in-add-newline.patch;patch=1 \
           file://p3scan.init \
           file://p3scan.conf \
           file://doc.configure.txt \
           file://volatiles.05_p3scan"

inherit autotools update-rc.d

EXTRA_OECONF = "--with-clamav=${STAGING_LIBDIR}/.. \
                --with-openssl=${STAGING_LIBDIR}/.. \
                --disable-ripmime"

# Full manual install because the autoconf installer puts in lots of
# stuff we don't want and in lots of odd directories.
do_install () {
        install -m 0755 -d ${D}${sysconfdir}/init.d \
                           ${D}${docdir}/p3scan \
                           ${D}${mandir}/man8 \
                           ${D}${sysconfdir}/p3scan \
                           ${D}${sysconfdir}/default/volatiles \
                           ${D}${sbindir}
        install -m 755 ${WORKDIR}/p3scan.init ${D}${sysconfdir}/init.d/p3scan
        install -m 755 ${WORKDIR}/p3scan.conf ${D}${sysconfdir}/p3scan/p3scan.conf
        install -m 644 ${WORKDIR}/doc.configure.txt ${D}${docdir}/p3scan/configure.txt
        install -m 755 src/.libs/p3scan ${D}${sbindir}
        for i in etc/p3scan-*.mail \
                 etc/p3scan.whitelist \
                 etc/p3scan.blacklist; do
          install -m 644 $i ${D}${sysconfdir}/p3scan/`basename $i`
        done
        for i in README ChangeLog README-ripmime README-emergency \
                 spamfaq.html etc/p3scan.conf.sample p3scan.sh \
                 AUTHORS CONTRIBUTERS; do
          install -m 644 $i ${D}${docdir}/p3scan/`basename $i`
        done
        install -m 644 man/p3scan.man ${D}${mandir}/man8/p3scan.8
        # We need some /var directories
        for i in 05_p3scan; do
          install -m 0644 ${WORKDIR}/volatiles.$i ${D}${sysconfdir}/default/volatiles/$i
        done
}

PACKAGES = "${PN}-dbg ${PN}-doc \
            ${PN}-templates-ru ${PN}-templates-en ${PN}-templates-pt-br \
            ${PN}-templates-sp ${PN}-templates-ge ${PN}-templates-fr \
            ${PN}-templates-nl ${PN}-templates-pl ${PN}-templates-it \
            ${PN}"

FILES_${PN} = "${sysconfdir}/p3scan/* \
               ${sysconfdir}/init.d ${sysconfdir}/default ${sbindir}/*"
FILES_${PN}-templates-ru = "${sysconfdir}/p3scan/p3scan-ru.mail"
FILES_${PN}-templates-en = "${sysconfdir}/p3scan/p3scan-en.mail"
FILES_${PN}-templates-pt-br = "${sysconfdir}/p3scan/p3scan-pt-br.mail"
FILES_${PN}-templates-sp = "${sysconfdir}/p3scan/p3scan-sp.mail"
FILES_${PN}-templates-ge = "${sysconfdir}/p3scan/p3scan-ge.mail"
FILES_${PN}-templates-fr = "${sysconfdir}/p3scan/p3scan-fr.mail"
FILES_${PN}-templates-nl = "${sysconfdir}/p3scan/p3scan-nl.mail"
FILES_${PN}-templates-pl = "${sysconfdir}/p3scan/p3scan-pl.mail"
FILES_${PN}-templates-it = "${sysconfdir}/p3scan/p3scan-it.mail"

# Add havp's user and groups
pkg_postinst_${PN} () {
        grep -q mail: /etc/group || addgroup --system havp
        grep -q mail: /etc/passwd || \
            adduser --disabled-password --home=${localstatedir}/mail --system \
                    --ingroup mail --no-create-home -g "Mail" mail
        /etc/init.d/populate-volatile.sh update
}

CONFFILES_${PN} = "${sysconfdir}/p3scan/p3scan.conf"

INITSCRIPT_NAME = "p3scan"
INITSCRIPT_PARAMS = "defaults 65 35"