aboutsummaryrefslogtreecommitdiffstats
path: root/mail/masqmail/Makefile
blob: b4a4ece2de9949133edf765429440a0364a0ffeb (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
# Ports collection makefile for:    masqmail
# Date created:             4 Apr 2004
# Whom:                 Andrey Slusar <anray@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   masqmail
PORTVERSION=    0.2.21
PORTREVISION=   2
CATEGORIES= mail
MASTER_SITES=   ${MASTER_SITE_DEBIAN_POOL}
DISTNAME=   ${PORTNAME}_${PORTVERSION}.orig

MAINTAINER= anray@FreeBSD.org
COMMENT=    Mail server for hosts, not permanently connected to the internet

.if !defined (NO_INSTALL_MANPAGES)
MAN5=       masqmail.aliases.5 masqmail.conf.5 masqmail.get.5 masqmail.route.5
MAN8=       masqmail.8 mservdetect.8
.endif

USE_GNOME=  glib20
USE_RC_SUBR=    masqmail
GNU_CONFIGURE=  yes
CFLAGS+=    -Wno-trigraphs
CONFIGURE_ARGS+=    --with-user=mailnull --with-group=mail \
        --with-confdir=${PREFIX}/etc/masqmail --with-logdir=/var/log/masqmail
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

.if !defined (NOPORTDOCS)
PORTDOCS=   AUTHORS COPYING INSTALL NEWS README TODO
.endif

OPTIONS +=  LIBCRYPTO   "Use libcrypto"     on
OPTIONS +=  POP3        "Enable POP3"       on
OPTIONS +=  SMTP        "Enable SMTP server"    on
OPTIONS +=  Resolver    "Resolver"      on
OPTIONS +=  MAILDIR     "Maildir support"   on
OPTIONS +=  MSERVER     "Enable mserver support"    off
OPTIONS +=  AUTH        "SMTP AUTH (RFC2554) support"   on
OPTIONS +=  IDENT       "Ident (RFC 1413) support"  off

.include <bsd.port.pre.mk>

.if defined(WITH_LIBCRYPTO)
CONFIGURE_ARGS+=    --with-libcrypto
.endif
.if defined(WITHOUT_POP3)
CONFIGURE_ARGS+=    --disable-pop3
.endif
.if defined(WITHOUT_SMTP)
CONFIGURE_ARGS+=    --disable-smtp-server
.endif
.if defined(WITHOUT_RESOLVER)
CONFIGURE_ARGS+=    --disable-resolver
.endif
.if defined(WITH_MAILDIR)
CONFIGURE_ARGS+=    --enable-maildir
.endif
.if defined(WITH_MSERVER)
CONFIGURE_ARGS+=    --enable-mserver
.endif
.if defined(WITH_AUTH)
CONFIGURE_ARGS+=    --enable-auth
.endif
.if defined(WITH_IDENT)
CONFIGURE_ARGS+=    --enable-ident
.endif

post-install:
    ${MKDIR} ${PREFIX}/etc/masqmail
    ${CHOWN} mailnull:mail ${PREFIX}/etc/masqmail
    ${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/masqmail.conf ${PREFIX}/etc/masqmail/masqmail.conf-dist
    ${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/example.get ${PREFIX}/etc/masqmail/masqmail.get-dist
    ${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/example.route ${PREFIX}/etc/masqmail/masqmail.route-dist

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>