summaryrefslogtreecommitdiff
path: root/mail/noattach/Makefile
blob: 311fb6325aecd10438cde969ea69192611e0db60 (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
# $FreeBSD$

PORTNAME=	noattach
PORTVERSION=	1.2
PORTREVISION=	1
CATEGORIES=	mail
MASTER_SITES=	ftp://ftp.rhnet.is/pub/noattach/

MAINTAINER=	dinoex@FreeBSD.org
COMMENT=	An attachment filter for Sendmail Milter

USES=		manpages:install
GNU_CONFIGURE=	yes
USE_RC_SUBR=    noattach
CFLAGS+=	${PTHREAD_CFLAGS:S=""==}
DOCSFILES=	AUTHORS THANKS INSTALL NEWS README TODO ChangeLog
SAMPLEFILES=	README noattach.patterns noattach.patterns.johncon
MAN8=		noattach.8

.include <bsd.port.pre.mk>

.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"

.if defined(WITH_SENDMAIL_PORT)
CONFIGURE_ENV+=	MILTER_INCLUDES="${MILTERINC}"
MAKE_ENV+=	MILTER_INCLUDES="${MILTERINC}"
.endif

pre-configure:
	${REINPLACE_CMD} -e 's=-pthread=${PTHREAD_LIBS}=' \
		${WRKSRC}/configure

do-install:	install-all-manpages
	${INSTALL_PROGRAM} ${WRKSRC}/noattach ${STAGEDIR}${PREFIX}/libexec/noattach
	${INSTALL_DATA} ${WRKSRC}/examples/noattach.patterns \
		 ${STAGEDIR}${PREFIX}/etc/noattach.patterns-dist
.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${DOCSFILES}
	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
.endfor
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for i in ${SAMPLEFILES}
	${INSTALL_DATA} ${WRKSRC}/examples/${i} ${STAGEDIR}${EXAMPLESDIR}/
.endfor
.endif

.include <bsd.port.post.mk>