aboutsummaryrefslogtreecommitdiffstats
path: root/mail/spamass-rules_du_jour/Makefile
blob: ffec46be6339b38bcfe8936277f0d3d52da4ece7 (plain) (blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# New ports collection makefile for: spamass-rules
# Date created:         20040802
# Whom:                 mranner@inode.at
#
# $FreeBSD$
#

PORTNAME=   rules_du_jour
PORTVERSION=    1.29b
PORTREVISION=   2
CATEGORIES= mail
MASTER_SITES=   http://www.ranner.jawa.at/stuff/
PKGNAMEPREFIX=  spamass-

MAINTAINER= mranner@inode.at
COMMENT=    Automatic updates of custom rulesets for SpamAssassin

RUN_DEPENDS=    bash:${PORTSDIR}/shells/bash \
                spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin

OPTIONS=    ANTIDRUG "Already included in SA 3.0" off \
        BLACKLIST "William Stearn's sa-blacklist" off \
        BLACKLISTU "William Stearn's URI blacklist" off \
        BOGUS_VIRUS "Catch 'collateral spam' caused by viruses" on \
        CURL "Use curl to download rule files" off \
        RANDOM "Detects spamware mistakes like: %RANDOM_WORD" on \
        SARE "Installs safe SARE rules" on \
        SARE_CODING "Ruleset for html coding abuse" off \
        SARE_HEADER "Ruleset for header abuse" off \
        SARE_SPEC "SARE Specific Ruleset" off \
        TRIPWIRE "Matches 3 chars that shouldn't be together" off
PLIST_FILES=    bin/rules_du_jour etc/mail/rulesdujour.sample
SUB_FILES=  pkg-message
NO_BUILD=       yes
USE_BZIP2=      yes
SPAMASS_CONF=   etc/mail/spamassassin
SPAMASS_DIR=    ${PREFIX}/${SPAMASS_CONF}

.include <bsd.port.pre.mk>

.if defined(WITH_ANTIDRUG)
SPAMASS_FILES+= ANTIDRUG
.endif

.if defined(WITH_BOGUS_VIRUS)
SPAMASS_FILES+= BOGUSVIRUS
.endif

.if defined(WITH_BLACKLIST)
SPAMASS_FILES+= BLACKLIST
.endif

.if defined(WITH_BLACKLISTU)
SPAMASS_FILES+= BLACKLIST_URI
.endif

.if defined(WITH_CURL)
RUN_DEPENDS+=   curl:${PORTSDIR}/ftp/curl
.endif

.if defined(WITH_RANDOM)
SPAMASS_FILES+= RANDOMVAL
.endif

.if defined(WITH_SARE)
.for i in SARE_ADULT SARE_FRAUD SARE_BML SARE_RATWARE SARE_SPOOF \
    SARE_BAYES_POISON_NXM SARE_OEM SARE_RANDOM \
    EVILNUMBERS
SPAMASS_FILES+= $i
.endfor
.endif

.if defined(WITH_SARE_CODING)
SPAMASS_FILES+= SARE_CODING
.endif

.if defined(WITH_SARE_HEADER)
SPAMASS_FILES+= SARE_HEADER
.endif

.if defined(WITH_SARE_SPEC)
SPAMASS_FILES+= SARE_SPECIFIC
.endif

.if defined(WITH_TRIPWIRE)
SPAMASS_FILES+= TRIPWIRE
.endif

do-build:
    @${DO_NADA}

pre-install:
    @${SED} -e 's|TRIPWIRE EVILNUMBERS SARE_RANDOM|${SPAMASS_FILES}|' \
        -e 's|PREFIX="/usr/local"|PREFIX="${PREFIX}"|' \
        <${WRKSRC}/config >${WRKSRC}/config.sample

do-install:
    @${INSTALL} -d -o root -g wheel -m 0755 ${SPAMASS_DIR}/RulesDuJour
    @${INSTALL} ${WRKSRC}/rules_du_jour ${PREFIX}/bin
    @${INSTALL_DATA} ${WRKSRC}/config.sample ${PREFIX}/etc/mail/rulesdujour.sample

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>