aboutsummaryrefslogtreecommitdiffstats
path: root/mail/spambnc/Makefile
blob: e102096ea124ebdb83cb3fdb96b070c1d88fc26a (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
# New ports collection makefile for:   spambnc
# Date created:        25 December 2000
# Whom:                George Reid <greid@ukug.uk.freebsd.org>
#
# $FreeBSD$
#

PORTNAME=   spambnc
PORTVERSION=    20050404
CATEGORIES= mail
MASTER_SITES=   http://www.spambouncer.org/ \
        ftp://ftp.spambouncer.org/
DISTFILES=  sb-beta.tar.gz index.shtml
DIST_SUBDIR=    spambnc-${PORTVERSION}
EXTRACT_ONLY=   sb-beta.tar.gz

MAINTAINER= thierry@FreeBSD.org
COMMENT=    Set of procmail recipies which handle known/suspected spam

RUN_DEPENDS=    procmail:${PORTSDIR}/mail/procmail

IGNOREFILES=    index.shtml
NO_WRKSUBDIR=   yes
NO_BUILD=   yes
PLIST=      ${WRKDIR}/.pkg-plist
PKGMESSAGE= ${WRKDIR}/pkg-message

SUB_DIRS=   functions docs data auxiliary

.if !defined(NOPORTDOCS)
MASTER_SITES+=  http://www.spambouncer.org/webdev/configure/:upg
DISTFILES+= upgrading.shtml:upg
IGNOREFILES+=   upgrading.shtml
.endif

pre-install:
    @${RM} -f ${PLIST}
    @(cd ${WRKDIR} && ${FIND} -s . -type f | ${GREP} -v "^\.\/\." | \
        ${SED} -e 's,.,%%DATADIR%%,1' >> ${PLIST})
.for dd in ${SUB_DIRS}
    @${ECHO_CMD} "@dirrm %%DATADIR%%/${dd}" >> ${PLIST}
.endfor
    @${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
.if !defined(NOPORTDOCS)
    @${ECHO_CMD} "%%DOCSDIR%%/documentation.html" >> ${PLIST}
    @${ECHO_CMD} "%%DOCSDIR%%/upgrading.html" >> ${PLIST}
    @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >> ${PLIST}
.endif

do-install:
    ${MKDIR} ${DATADIR}
    cd ${WRKDIR} && ${CP} -Rv * ${DATADIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/index.shtml \
        ${DOCSDIR}/documentation.html
    @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/upgrading.shtml \
        ${DOCSDIR}/upgrading.html
.endif

post-install:
    @${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},;s,%%DATADIR%%,${DATADIR},' \
        < ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>