aboutsummaryrefslogtreecommitdiff
path: root/security/clamsmtp/Makefile
blob: 115d8f3b2aacadc5d49547d170e5350a7399e278 (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
# Created by: Cheng-Lung Sung <clsung@dragon2.net>

PORTNAME=	clamsmtp
PORTVERSION=	1.10
PORTREVISION=	4
CATEGORIES=	security
MASTER_SITES=	https://jarasoft.net/clamsmtp/
DISTFILES=	${DISTNAME:S/-/_/}.orig${EXTRACT_SUFX}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	ClamAV anti-virus SMTP Filter

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/COPYING

GNU_CONFIGURE=	yes
USES=		gmake
USE_RC_SUBR=	clamsmtpd
SUB_LIST=	CLAMAV_PID_DIR=${CLAMAV_PID_DIR}
SUB_FILES=	pkg-message

CLAMAV_PID_DIR?=/var/run/clamav

PORTDOCS=	README
PORTEXAMPLES=	*

OPTIONS_DEFINE=		DOCS LOCAL_CLAMAV EXAMPLES
OPTIONS_DEFAULT=	LOCAL_CLAMAV

LOCAL_CLAMAV_DESC=		RUN_DEPEND on security/clamav
LOCAL_CLAMAV_RUN_DEPENDS=	clamav>=0:security/clamav
LOCAL_CLAMAV_SUB_LIST=		CLAMD=clamd
LOCAL_CLAMAV_SUB_LIST_OFF=	CLAMD=

post-patch:
	@${REINPLACE_CMD} -e "s,/var/run/clamav/clamd,/var/run/clamav/clamd.sock," \
		${WRKSRC}/doc/clamsmtpd.conf \
		${WRKSRC}/doc/clamsmtpd.conf.5 \
		${WRKSRC}/src/clamsmtpd.c

post-install:
	${INSTALL_DATA} ${WRKSRC}/doc/clamsmtpd.conf ${STAGEDIR}${PREFIX}/etc/clamsmtpd.conf.sample

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/virus_action.sh ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>