summaryrefslogtreecommitdiff
path: root/security/samba-vscan/Makefile
blob: 7fe1852a2e524c4b459cbc4388179baf7354a4ae (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# New ports collection makefile for:	samba-vscan
# Date created:		27 February 2004
# Whom:			Jean Milanez Melo <jmelo@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	samba-vscan
PORTVERSION=	0.3.6c
PORTREVISION=	1
CATEGORIES=	security
MASTER_SITES=	http://www.openantivirus.org/download/
DISTNAME=	${PORTNAME}-${PORTVERSION}-beta4

MAINTAINER=	jmelo@FreeBSD.org
COMMENT=	On-access virus scanning with Samba

BUILD_DEPENDS=	${NONEXISTENT}:${PORTSDIR}/net/${VSCAN_SAMBA_PORT}:configure

OPTIONS=	VSCAN_ANTIVIR "for use with AntiVir" off \
		VSCAN_CLAMAV "for use with Clam AntiVirus Daemon" off \
		VSCAN_FPROTD "for use with F-Prot Daemon" off \
		VSCAN_FSAV "for use with F-Secure AntiVirus" off \
		VSCAN_ICAP "for use with an ICAP anti-virus" off \
		VSCAN_KAVP "for use with Kaspersky AntiVirus" off \
		VSCAN_MKSD "for use with mks32" off \
		VSCAN_NAI "for use with NAI/McAfee uvscan" off \
		VSCAN_OAV "for use with OpenAntiVirus.org ScannerDaemon" off \
		VSCAN_SOPHOS "for use with Sophos" off \
		VSCAN_TREND "for use with Trend Micro FileScanner" off

PORTDOCS=	AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README

USE_AUTOTOOLS=	autoconf:261
VSCAN_SAMBA_PORT?=	samba3
SAMBA_WRKSRC!=	cd ${.CURDIR}/../../net/${VSCAN_SAMBA_PORT}; ${MAKE} -V WRKSRC
HAS_CONFIGURE=	yes
USE_GMAKE=	yes
CONFIGURE_ARGS=	--with-samba-source=${SAMBA_WRKSRC}
ETCDIR=		etc/samba-vscan
SUB_FILES=	pkg-message
VFSDIR?=	lib/samba/vfs
VSCAN_NAME=
VSCAN_CONF=
ALL_TARGET=

.include <bsd.port.pre.mk>

.if ${VSCAN_SAMBA_PORT} != "samba3"
VFSDIR=lib/samba
.endif

.if defined(WITH_VSCAN_ANTIVIR)
ALL_TARGET+=antivir
VSCAN_NAME+=vscan-antivir.so
VSCAN_CONF+=antivir/vscan-antivir.conf
.endif

.if defined(WITH_VSCAN_CLAMAV)
ALL_TARGET+=clamav
VSCAN_NAME+=vscan-clamav.so
VSCAN_CONF+=clamav/vscan-clamav.conf
.endif

.if defined(WITH_VSCAN_FPROTD)
ALL_TARGET+=fprotd
VSCAN_NAME+=vscan-fprotd.so
VSCAN_CONF+=fprot/vscan-fprotd.conf
.endif

.if defined(WITH_VSCAN_FSAV)
ALL_TARGET+=fsav
VSCAN_NAME+=vscan-fsav.so
VSCAN_CONF+=f-secure/vscan-fsav.conf
.endif

.if defined(WITH_VSCAN_ICAP)
ALL_TARGET+=icap
VSCAN_NAME+=vscan-icap.so
VSCAN_CONF+=icap/vscan-icap.conf
.endif

.if defined(WITH_VSCAN_KAVP)
ALL_TARGET+=kavp
VSCAN_NAME+=vscan-kavp.so
VSCAN_CONF+=kaspersky/vscan-kavp.conf
.endif

.if defined(WITH_VSCAN_MKSD)
ALL_TARGET+=mksd
VSCAN_NAME+=vscan-mksd.so
VSCAN_CONF+=mks/vscan-mks32.conf
.endif

.if defined(WITH_VSCAN_NAI)
ALL_TARGET+=nai
VSCAN_NAME+=vscan-mcdaemon.so
VSCAN_CONF+=nai/vscan-mcdaemon.conf
.endif

.if defined(WITH_VSCAN_OAV)
ALL_TARGET+=oav
VSCAN_NAME+=vscan-oav.so
VSCAN_CONF+=openantivirus/vscan-oav.conf
.endif

.if defined(WITH_VSCAN_SOPHOS)
ALL_TARGET+=sophos
VSCAN_NAME+=vscan-sophos.so
VSCAN_CONF+=sophos/vscan-sophos.conf
.endif

.if defined(WITH_VSCAN_TREND)
ALL_TARGET+=trend
VSCAN_NAME+=vscan-trend.so
VSCAN_CONF+=trend/vscan-trend.conf
.endif

PLIST_FILES+=	${VSCAN_NAME:S|^|${VFSDIR}/|} \
		${VSCAN_CONF:S|^|${ETCDIR}/|:C|(.*/).*/(.*.conf)|\1\2|}
PLIST_DIRS=	${ETCDIR} ${VFSDIR}

pre-configure:
.if ${VSCAN_SAMBA_PORT} == "samba3"
		@cd ${SAMBA_WRKSRC}; make proto 2>&1 > /dev/null
.endif

do-install:
.for i in ${VSCAN_NAME}
	@${MKDIR} ${PREFIX}/${VFSDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/${VFSDIR}
.endfor
	@${MKDIR} ${PREFIX}/${ETCDIR}
.for i in ${VSCAN_CONF}
	${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/${ETCDIR}
.endfor

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
	@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>