aboutsummaryrefslogtreecommitdiffstats
path: root/mail/drac/Makefile
blob: 87f35da038d5fe4f3db3c8538ac181539ce5f2d4 (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
# New ports collection makefile for:    drac
# Date created:         07 January 2001
# Whom:             Anders Nordby <anders@fix.no>
#
# $FreeBSD$
#

PORTNAME=   drac
PORTVERSION=    1.12
#PORTREVISION=  1
CATEGORIES= mail
MASTER_SITES=   ftp://ftp.cc.umanitoba.ca/src/ \
        http://atreides.freenix.no/~anders/ \
        ftp://totem.fix.no/pub/mirrors/misc/
DISTNAME=   ${PORTNAME}
EXTRACT_SUFX=   .tar.Z

MAINTAINER= ports@FreeBSD.org
COMMENT=    Dynamic Relay Authorization Control, a pop-before-smtp implementation

.if defined(WITH_POSTFIX_DB3)
LIB_DEPENDS+=   db3.3:${PORTSDIR}/databases/db3
.endif

NO_WRKSUBDIR=   yes
USE_REINPLACE=  yes

MAN3=       dracauth.3
MAN1=       rpc.dracd.1

.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 500018
MAKE_ARGS+= -DWITH_TI_RPC
.endif

pre-everything::
    @${ECHO_MSG} "============================================================="
    @${ECHO_MSG} "For databases compatible with other MTAs than sendmail, use:"
    @${ECHO_MSG}
    @${ECHO_MSG} "WITH_POSTFIX=yes  (Postfix)"
    @${ECHO_MSG} "WITH_POSTFIX_DB3=yes  (Postfix with DB3 database maps)"
    @${ECHO_MSG} "WITH_EXIM=yes     (Exim)"
    @${ECHO_MSG}
    @${ECHO_MSG} "Define WITH_FOREGROUND to make the rpc.dracd daemon stay in"
    @${ECHO_MSG} "foreground instead of detaching itself. This breaks the"
    @${ECHO_MSG} "startup script."
    @${ECHO_MSG} "============================================================="

post-patch:
    @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m

do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/rpc.dracd ${PREFIX}/sbin/
    @${INSTALL_DATA} ${WRKSRC}/drac.h ${PREFIX}/include/
    @${INSTALL_DATA} ${WRKSRC}/libdrac.a ${PREFIX}/lib/
.if !defined(NOPORTDOCS)
    @${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/
    @${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1
.endif
    @${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/dracd.sh startup file."
    @${INSTALL_SCRIPT} ${FILESDIR}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh

.include <bsd.port.post.mk>