summaryrefslogtreecommitdiff
path: root/mail/maildrop/Makefile
blob: eec63388e29cb2db7bea9a8437df88103280a717 (plain)
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
# $NetBSD: Makefile,v 1.46 2007/09/11 04:33:37 jlam Exp $

DISTNAME=	maildrop-2.0.4
PKGREVISION=	2
CATEGORIES=	security
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	jlam@pkgsrc.org
COMMENT=	Courier mail delivery agent with filtering abilities
HOMEPAGE=	http://www.courier-mta.org/maildrop/

PKG_DESTDIR_SUPPORT=	user-destdir

DEPENDS+=	courier-maildir>=0.53.1:../../mail/courier-maildir

USE_TOOLS+=		gmake perl
USE_TOOLS+=		cat:run		# used by makedat(1)
USE_LANGUAGES=		c c++

PKG_OPTIONS_VAR=	PKG_OPTIONS.maildrop
PKG_SUPPORTED_OPTIONS=	authlib
PKG_SUGGESTED_OPTIONS=	authlib

.include "../../mk/bsd.options.mk"
.include "../../mail/courier-mta/Makefile.common"

# These are the users that may invoke maildrop with the "-d user"
# argument (mailbox delivery mode).
#
MAILDROP_TRUSTED_USERS?=	${REAL_ROOT_USER} ${COURIER_USER} qmaild

CONFIGURE_ARGS+=	--datadir=${DATADIR:Q}
CONFIGURE_ARGS+=	--libexecdir=${LIBEXECDIR:Q}
CONFIGURE_ARGS+=	--with-etcdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+=	--with-makedatprog=${LIBEXECDIR:Q}/makedatprog
CONFIGURE_ARGS+=	--enable-maildirquota
CONFIGURE_ARGS+=	--enable-maildrop-uid=${ROOT_USER:Q}
CONFIGURE_ARGS+=	--enable-maildrop-gid=${COURIER_GROUP:Q}
CONFIGURE_ARGS+=	--enable-trusted-users=${MAILDROP_TRUSTED_USERS:Q}
CONFIGURE_ARGS+=	--enable-trusted-groups=${COURIER_GROUP:Q}
CONFIGURE_ARGS+=	--enable-syslog=1

.if !empty(PKG_OPTIONS:Mauthlib)
CONFIGURE_ARGS+=	--enable-authlib
.  include "../../security/courier-authlib/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-authlib
.endif

INSTALL_AM_MAKEFLAGS+=	htmldir=${DOCDIR:Q}
INSTALL_MAKE_FLAGS=	${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q}

REQD_DIRS=	${DATADIR} ${DOCDIR} ${LIBEXECDIR}

# Note special permissions for some binaries.  These are set to match
# the defaults from a courier-mta installation.
#
SPECIAL_PERMS=	bin/lockmail ${REAL_ROOT_USER} ${COURIER_GROUP} 755
SPECIAL_PERMS+=	bin/maildrop ${REAL_ROOT_USER} ${COURIER_GROUP} 4555

.include "../../devel/sysexits/buildlink3.mk"

INSTALLATION_DIRS=	${DOCDIR}/maildrop

post-install:
	${INSTALL_DATA} ${WRKSRC}/README.postfix ${DESTDIR}${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/maildrop/maildroptips.html ${DESTDIR}${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/maildrop/README.html ${DESTDIR}${DOCDIR}/maildrop
	${INSTALL_DATA} ${WRKSRC}/maildrop/makedat.html ${DESTDIR}${DOCDIR}
	${INSTALL_MAN} ${WRKSRC}/maildrop/makedat.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1

.include "../../mk/bsd.pkg.mk"