blob: 62f01af8f61e66595954396616e93fd7c333aa2e (
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
|
# Created by: Daniel Roethlisberger <daniel@roe.ch>
# $FreeBSD$
PORTNAME= dma
PORTVERSION= v0.9
PORTEPOCH= 1
CATEGORIES= mail ipv6
EXTRACT_SUFX=
MAINTAINER= bapt@FreeBSD.org
COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail
LICENSE= BSD3CLAUSE
USE_OPENSSL= yes
USE_GITHUB= yes
GH_COMMIT= 2bb8bcb
GH_ACCOUNT= corecode
GH_TAGNAME= ${GH_COMMIT}
CFLAGS+= -I${OPENSSLINC} \
-DCONF_PATH='\"${PREFIX}/etc/dma\"' \
-DDMA_ROOT_USER='\"mailnull\"' \
-DDMA_GROUP='\"mail\"'
LDFLAGS+= -L${OPENSSLLIB}
USE_RC_SUBR= dma_flushq
SUB_FILES= pkg-message
PLIST_SUB+= RESETPREFIX=${PREFIX}
# Allow subports to extend.
CONFFILES+= dma.conf auth.conf
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 900000
EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-8-spool.c
.else
EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-else-spool.c
.endif
pre-patch:
@${MKDIR} ${WRKSRC}/dma ${WRKSRC}/dma-mbox-create
@${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dist
post-patch:
@${REINPLACE_CMD} -e 's,/etc/dma,${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.8
@${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \
${WRKSRC}/dma.conf
.if ${OSVERSION} < 1000013
@${REINPLACE_CMD} -e 's,^YFLAGS.*,,' ${WRKSRC}/dma/Makefile
.endif
do-install:
${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${STAGEDIR}/${PREFIX}/libexec
${INSTALL} -o root -g mail -m 4550 \
${WRKSRC}/dma-mbox-create/dma-mbox-create ${STAGEDIR}/${PREFIX}/libexec
${INSTALL_MAN} ${WRKSRC}/dma.8 ${STAGEDIR}/${PREFIX}/man/man8/
${MKDIR} ${STAGEDIR}/${PREFIX}/etc/dma
.for i in ${CONFFILES}
${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/etc/dma/${i}.sample
.endfor
${CHMOD} o-r ${STAGEDIR}/${PREFIX}/etc/dma/auth.conf.sample
${INSTALL} -d -o root -g mail -m 770 ${STAGEDIR}/var/spool/dma
.include <bsd.port.post.mk>
|