aboutsummaryrefslogtreecommitdiffstats
path: root/mail/gld/Makefile
blob: c307563ebb8650402536f4653622c28f49f3f907 (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
# New ports collection makefile for:    gld
# Date created:             15 Jul 2004
# Whom:                 Blaz Zupan <blaz@si.FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gld
PORTVERSION=    1.4
PORTREVISION=   1
CATEGORIES= mail
MASTER_SITES=   http://www.gasmi.net/down/
EXTRACT_SUFX=   .tgz

MAINTAINER= blaz@si.FreeBSD.org
COMMENT=    Greylisting daemon for Postfix

USE_MYSQL=  yes
USE_REINPLACE=  yes
USE_RC_SUBR=    yes
HAS_CONFIGURE=  yes

CONFIGURE_ARGS+=    --with-mysql=${PREFIX}

PKGMESSAGE= ${WRKDIR}/MESSAGE

SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
        -e 's,%%PREFIX%%,${PREFIX},g' \
        -e 's,%%RC_SUBR%%,${RC_SUBR},g'

pre-build:
    ${REINPLACE_CMD} -e 's,"/etc/gld.conf","${PREFIX}/etc/gld.conf",' ${WRKSRC}/gld.h
    for f in gld.sh MESSAGE; do \
        ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl >> ${WRKDIR}/$${f}; \
    done

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/gld ${PREFIX}/sbin
    ${INSTALL_DATA} ${WRKSRC}/gld.conf ${PREFIX}/etc/gld.conf-dist
    ${INSTALL_SCRIPT} ${WRKDIR}/gld.sh ${PREFIX}/etc/rc.d
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for FILE in HISTORY LICENCE README tables.sql
    ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
.endif

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

.include <bsd.port.mk>