summaryrefslogtreecommitdiff
path: root/mail/pop3vscan/Makefile
blob: c16851d7460964153785b97443d2aa9f538e1da6 (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
# Created by: Yen-Ming Lee <leeym@FreeBSD.org>
# $FreeBSD$

PORTNAME=	pop3vscan
PORTVERSION=	0.4
PORTREVISION=	3
CATEGORIES=	mail
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER=	leeym@FreeBSD.org
COMMENT=	A transparent POP3-Proxy with virus-scanning capabilities

LIB_DEPENDS=	pcre.3:${PORTSDIR}/devel/pcre

USE_GMAKE=	yes
MAKE_ENV=	_LDFLAGS="${LDFLAGS}"
SCRIPTS_ENV=	PKG_PREFIX=${PREFIX} NONEXISTENT=${NONEXISTENT} PASSWD=/etc/passwd

PLIST_FILES=	etc/pop3vscan.conf.sample \
		etc/pop3vscan.mail.sample \
		etc/rc.d/pop3vscan.sh \
		sbin/pop3vscan

SUB_FILES=	pkg-message

NO_STAGE=	yes
post-extract:
	@${RM} ${WRKSRC}/ripmime/ripmime.a

post-patch:
	@${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,g' ${WRKSRC}/*.c
	@${REINPLACE_CMD} -e 's,#endif.*,#endif,g' ${WRKSRC}/*.h
	@${REINPLACE_CMD} -e 's,make,${GMAKE},g' ${WRKSRC}/ripmime/build_tnef
	@${REINPLACE_CMD} -e 's,=4321,=_BYTE_ORDER -include /usr/include/machine/endian.h,g' \
		${WRKSRC}/ripmime/tnef/Makefile

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/pop3vscan ${PREFIX}/sbin/
	${INSTALL_DATA} ${WRKSRC}/pop3vscan.conf ${PREFIX}/etc/pop3vscan.conf.sample
	${INSTALL_DATA} ${WRKSRC}/pop3vscan.mail ${PREFIX}/etc/pop3vscan.mail.sample
	${INSTALL_SCRIPT} ${FILESDIR}/pop3vscan.sh ${PREFIX}/etc/rc.d/

post-install:
	@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>