summaryrefslogtreecommitdiff
path: root/security/f-prot-antivirus6-ms-bin/Makefile
blob: a521c6b707adb9c9113b7ef4aad2d08ccec6edd0 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $NetBSD: Makefile,v 1.4 2011/09/25 14:13:49 taca Exp $
#
DISTNAME=		${FP_DISTNAME}
CATEGORIES=		security

MAINTAINER=		taca@NetBSD.org
HOMEPAGE=		http://www.f-prot.com/products/corporate_users/unix/
COMMENT=		F-PROT antivirus for Mail Servers

PKG_DESTDIR_SUPPORT=	user-destdir
USE_TOOLS+=		pax perl:run

FP_TYPE=		ms

RCD_SCRIPTS=		fpscand scanmail

BUILD_DEFS+=		FPROT_GROUP FPROT_USER VARBASE

VARDIR=			${VARBASE}/f-prot

OWN_DIRS_PERMS+=	${VARDIR} ${BINOWN} ${BINGRP} 0775 \
			${VARDIR}/backup ${BINOWN} ${FPROT_GROUP} 0770 \
			${VARDIR}/run ${BINOWN} ${FPROT_GROUP} 0770 \
			${VARDIR}/tmp ${BINOWN} ${FPROT_GROUP} 0770 \

FILES_SUBST+=		FPROT_USER=${FPROT_USER} VARDIR=${VARDIR}
PLIST_SUBST+=		VARDIR=${VARDIR}

SPECIAL_PERMS+=		${FPROTDIR}/scan-mail.pl ${BINOWN} ${FPROT_GROUP} 0750

PKG_GROUP=		${FPROT_GROUP}
PKG_USERS=		${FPROT_USER}

REPLACE_PERL+=		mailtools/scan-mail.pl perl/lib/Anomy/HTMLCleaner.pm \
			perl/lib/Anomy/Log.pm perl/lib/Anomy/MIMEStream.pm \
			perl/lib/Anomy/Sanitizer/FProt/Client.pm \
			perl/lib/Anomy/Sanitizer/FileTypes.pm \
			perl/lib/Anomy/Sanitizer.pm

SUBST_CLASSES+=		paths
SUBST_MESSAGE.paths=	Configuring default paths.
SUBST_STAGE.paths=	pre-install
SUBST_SED.paths=	${FILES_SUBST_SED}
SUBST_FILES.paths+=	mailtools/scan-mail.pl

INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 \
			${PKGMANDIR}/man8 sbin ${DATADIR} ${DOCDIR}/html \
			${EGDIR} ${FPROTDIR} ${PERL5_SUB_INSTALLVENDORLIB}

.include "../../mk/bsd.prefs.mk"

FPROT_GROUP?=		f-prot
FPROT_USER?=		f-prot

do-install: install-common install-fpscand install-ms

install-ms:
	${INSTALL_SCRIPT} ${WRKSRC}/mailtools/scan-mail.pl \
		${DESTDIR}${PREFIX}/${FPROTDIR}
	${CHMOD} 0750  ${DESTDIR}${PREFIX}/${FPROTDIR}/scan-mail.pl
	cd ${WRKSRC}/mailtools; \
		${INSTALL_PROGRAM} fp-milter fp-qmail \
			${DESTDIR}${PREFIX}/${FPROTDIR}
	cd ${WRKSRC}/doc/man/; \
		${INSTALL_MAN} scan-mail.pl.8 \
			${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${FIND} ${WRKSRC}/perl -type f -exec ${CHMOD} 0444 {} \; \
			-name '*.orig' -exec rm -f {} \;
	cd ${WRKSRC}/perl/lib; pax -rw . ${DESTDIR}${PERL5_INSTALLVENDORLIB}

.include "../../security/f-prot-antivirus6/Makefile.common"
.include "../../mk/bsd.pkg.mk"