Lines 8-14
Link Here
|
8 |
|
8 |
|
9 |
PORTNAME= amavisd-new |
9 |
PORTNAME= amavisd-new |
10 |
PORTVERSION= 2.4.2 |
10 |
PORTVERSION= 2.4.2 |
11 |
PORTREVISION= 2 |
11 |
PORTREVISION= 3 |
12 |
PORTEPOCH= 1 |
12 |
PORTEPOCH= 1 |
13 |
CATEGORIES= security |
13 |
CATEGORIES= security |
14 |
MASTER_SITES= http://www.ijs.si/software/amavisd/ \ |
14 |
MASTER_SITES= http://www.ijs.si/software/amavisd/ \ |
Lines 20-26
Link Here
|
20 |
COMMENT= Performance-enhanced daemonized version of amavis-perl |
20 |
COMMENT= Performance-enhanced daemonized version of amavis-perl |
21 |
|
21 |
|
22 |
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ |
22 |
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ |
23 |
${SITE_PERL}/MIME/Words.pm:${PORTSDIR}/mail/p5-MIME-Tools \ |
23 |
${SITE_PERL}/MIME/Parser.pm:${PORTSDIR}/mail/p5-MIME-Tools \ |
24 |
${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ |
24 |
${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ |
25 |
${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ |
25 |
${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ |
26 |
${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \ |
26 |
${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \ |
Lines 29-41
Link Here
|
29 |
${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ |
29 |
${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ |
30 |
${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ |
30 |
${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ |
31 |
${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ |
31 |
${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ |
32 |
${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \ |
32 |
${SITE_PERL}/IO/Wrap.pm:${PORTSDIR}/devel/p5-IO-stringy \ |
33 |
${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \ |
33 |
${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \ |
34 |
${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB \ |
34 |
${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server |
35 |
${LOCALBASE}/bin/cabextract:${PORTSDIR}/archivers/cabextract \ |
|
|
36 |
${LOCALBASE}/bin/rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio |
37 |
|
35 |
|
38 |
USE_PERL5_RUN= yes |
36 |
USE_PERL5_RUN= yes |
|
|
37 |
GNU_CONFIGURE= yes |
38 |
CONFIGURE_ARGS= --with-user=${AMAVISUSER} --with-runtime-dir=${AMAVISDIR} |
39 |
CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs |
40 |
BUILD_WRKSRC= ${WRKSRC}/helper-progs |
39 |
|
41 |
|
40 |
AMAVISUSER?= vscan |
42 |
AMAVISUSER?= vscan |
41 |
AMAVISGROUP?= vscan |
43 |
AMAVISGROUP?= vscan |
Lines 44-69
Link Here
|
44 |
|
46 |
|
45 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//} |
47 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//} |
46 |
|
48 |
|
47 |
OPTIONS= MYSQL "MySQL support" off \ |
49 |
OPTIONS= BDB "Use BerkeleyDB for nanny/cache/snmp" on \ |
48 |
PGSQL "PgSQL support" off \ |
50 |
SQLITE "Use SQLite for lookups/logging/quarantine" off \ |
49 |
LDAP "LDAP support" off \ |
51 |
MYSQL "Use MySQL for lookups/logging/quarantine" off \ |
50 |
MILTER "sendmail milter support" on \ |
52 |
PGSQL "Use PgSQL for lookups/logging/quarantine" off \ |
51 |
RAR "rar support" on \ |
53 |
LDAP "Use LDAP for lookups" off \ |
52 |
ARJ "arj support" on \ |
54 |
SASL "Use SASL authentication" off \ |
53 |
LHA "lha support" on \ |
55 |
MILTER "Sendmail milter support" on \ |
54 |
ARC "arc support" on \ |
56 |
NEW_MILTER "New sendmail milter support (external module)" off \ |
55 |
ZOO "zoo support with zoo archiver" on \ |
57 |
SPAMASSASSIN "Use mail/p5-Mail-SpamAssassin" on \ |
56 |
UNZOO "zoo support with unzoo archiver" off \ |
58 |
P0F "Passive operating system fingerprinting" off \ |
57 |
LZOP "lzop support" on \ |
59 |
FILE "Use newer file(1) utility from ports" off \ |
58 |
FREEZE "freeze support" on |
60 |
RAR "RAR support with archivers/rar" off \ |
|
|
61 |
UNRAR "RAR support with archivers/unrar" on \ |
62 |
ARJ "ARJ support with archivers/arj" on \ |
63 |
UNARJ "ARJ support with archivers/unarj" off \ |
64 |
LHA "LHA support with archivers/lha" on \ |
65 |
ARC "ARC support with archivers/arc" on \ |
66 |
NOMARCH "ARC support with archivers/nomarch" off \ |
67 |
CAB "CAB support with archivers/cabextract" on \ |
68 |
RPM "RPM support with archivers/rpm2cpio" on \ |
69 |
ZOO "ZOO support with archivers/zoo" on \ |
70 |
UNZOO "ZOO support with archivers/unzoo" off \ |
71 |
LZOP "LZOP support with archivers/lzop" on \ |
72 |
FREEZE "FREEZE support with archivers/freeze" on \ |
73 |
TNEF "Add external tnef decoder converters/tnef" off |
59 |
|
74 |
|
60 |
SUB_FILES= pkg-install pkg-deinstall pkg-message |
75 |
SUB_FILES= pkg-install pkg-deinstall pkg-message |
61 |
|
76 |
|
62 |
SUB_LIST= AMAVISUSER=${AMAVISUSER} \ |
77 |
SUB_LIST+= AMAVISUSER=${AMAVISUSER} \ |
63 |
AMAVISGROUP=${AMAVISGROUP} \ |
78 |
AMAVISGROUP=${AMAVISGROUP} \ |
64 |
AMAVISDIR=${AMAVISDIR} \ |
79 |
AMAVISDIR=${AMAVISDIR} \ |
65 |
AMAVISQUARANTINE=${AMAVISQUARANTINE} \ |
80 |
AMAVISQUARANTINE=${AMAVISQUARANTINE} |
66 |
DOCSDIR=${DOCSDIR} |
81 |
|
|
|
82 |
PLIST_SUB+= AMAVIS_NOAMAVIS=${AMAVIS_NOAMAVIS} \ |
83 |
AMAVIS_NOMILTER=${AMAVIS_NOMILTER} \ |
84 |
AMAVIS_NOP0F=${AMAVIS_NOP0F} |
67 |
|
85 |
|
68 |
.include <bsd.port.pre.mk> |
86 |
.include <bsd.port.pre.mk> |
69 |
|
87 |
|
Lines 79-100
Link Here
|
79 |
AMAVIS_NOMILTER="@comment " |
97 |
AMAVIS_NOMILTER="@comment " |
80 |
.endif |
98 |
.endif |
81 |
|
99 |
|
82 |
PLIST_SUB+= AMAVIS_NOMILTER=${AMAVIS_NOMILTER} \ |
100 |
.if defined(WITH_BDB) |
83 |
AMAVIS_NOAMAVIS=${AMAVIS_NOAMAVIS} \ |
101 |
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB |
84 |
RC_DIR=${RC_DIR} \ |
|
|
85 |
RC_SUFX=${RC_SUFX} |
86 |
|
87 |
.if defined(AMAVIS_NOAMAVIS) |
88 |
do-build: |
89 |
@${ECHO} libmilter not available, not building amavis-milter and amavis |
90 |
.else |
91 |
GNU_CONFIGURE= yes |
92 |
CONFIGURE_ARGS= --with-user=${AMAVISUSER} --with-runtime-dir=${AMAVISDIR} |
93 |
CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs |
94 |
BUILD_WRKSRC= ${WRKSRC}/helper-progs |
95 |
.endif |
102 |
.endif |
96 |
|
103 |
|
97 |
SED_SCRIPT= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} |
104 |
.if defined(WITH_SQLITE) |
|
|
105 |
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite |
106 |
.endif |
98 |
|
107 |
|
99 |
.if defined(WITH_MYSQL) |
108 |
.if defined(WITH_MYSQL) |
100 |
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql |
109 |
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql |
Lines 108-114
Link Here
|
108 |
RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap |
117 |
RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap |
109 |
.endif |
118 |
.endif |
110 |
|
119 |
|
|
|
120 |
.if defined(WITH_SASL) |
121 |
RUN_DEPENDS+= ${SITE_PERL}/Authen/SASL.pm:${PORTSDIR}/security/p5-Authen-SASL |
122 |
.endif |
123 |
|
124 |
.if defined(WITH_NEW_MILTER) |
125 |
RUN_DEPENDS+= ${LOCALBASE}/sbin/amavisd-milter:${PORTSDIR}/security/amavisd-milter |
126 |
.endif |
127 |
|
128 |
.if defined(WITH_SPAMASSASSIN) |
129 |
RUN_DEPENDS+= ${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin |
130 |
.endif |
131 |
|
132 |
.if defined(WITH_P0F) |
133 |
RUN_DEPENDS+= ${LOCALBASE}/bin/p0f:${PORTSDIR}/net-mgmt/p0f |
134 |
USE_RC_SUBR+= p0fanalyzer.sh |
135 |
.else |
136 |
AMAVIS_NOP0F= "@comment " |
137 |
.endif |
138 |
|
139 |
.if defined(WITH_FILE) |
140 |
RUN_DEPENDS+= ${LOCALBASE}/bin/file:${PORTSDIR}/sysutils/file |
141 |
.endif |
142 |
|
111 |
.if defined(WITH_RAR) |
143 |
.if defined(WITH_RAR) |
|
|
144 |
RUN_DEPENDS+= ${LOCALBASE}/bin/rar:${PORTSDIR}/archivers/rar |
145 |
.endif |
146 |
|
147 |
.if defined(WITH_UNRAR) |
112 |
RUN_DEPENDS+= ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar |
148 |
RUN_DEPENDS+= ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar |
113 |
.endif |
149 |
.endif |
114 |
|
150 |
|
Lines 116-121
Link Here
|
116 |
RUN_DEPENDS+= ${LOCALBASE}/bin/arj:${PORTSDIR}/archivers/arj |
152 |
RUN_DEPENDS+= ${LOCALBASE}/bin/arj:${PORTSDIR}/archivers/arj |
117 |
.endif |
153 |
.endif |
118 |
|
154 |
|
|
|
155 |
.if defined(WITH_UNARJ) |
156 |
RUN_DEPENDS+= ${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj |
157 |
.endif |
158 |
|
119 |
.if defined(WITH_LHA) |
159 |
.if defined(WITH_LHA) |
120 |
RUN_DEPENDS+= ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha |
160 |
RUN_DEPENDS+= ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha |
121 |
.endif |
161 |
.endif |
Lines 124-129
Link Here
|
124 |
RUN_DEPENDS+= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc |
164 |
RUN_DEPENDS+= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc |
125 |
.endif |
165 |
.endif |
126 |
|
166 |
|
|
|
167 |
.if defined(WITH_NOMARCH) |
168 |
RUN_DEPENDS+= ${LOCALBASE}/bin/nomarch:${PORTSDIR}/archivers/nomarch |
169 |
.endif |
170 |
|
171 |
.if defined(WITH_CAB) |
172 |
RUN_DEPENDS+= ${LOCALBASE}/bin/cabextract:${PORTSDIR}/archivers/cabextract |
173 |
.endif |
174 |
|
175 |
.if defined(WITH_RPM) |
176 |
RUN_DEPENDS+= ${LOCALBASE}/bin/rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio |
177 |
.endif |
178 |
|
127 |
.if defined(WITH_ZOO) |
179 |
.if defined(WITH_ZOO) |
128 |
RUN_DEPENDS+= ${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo |
180 |
RUN_DEPENDS+= ${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo |
129 |
.endif |
181 |
.endif |
Lines 140-149
Link Here
|
140 |
RUN_DEPENDS+= ${LOCALBASE}/bin/unfreeze:${PORTSDIR}/archivers/freeze |
192 |
RUN_DEPENDS+= ${LOCALBASE}/bin/unfreeze:${PORTSDIR}/archivers/freeze |
141 |
.endif |
193 |
.endif |
142 |
|
194 |
|
|
|
195 |
.if defined(WITH_TNEF) |
196 |
RUN_DEPENDS+= ${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef |
197 |
.endif |
198 |
|
143 |
post-patch: |
199 |
post-patch: |
144 |
.for f in amavisd.conf amavisd.conf-sample amavisd amavisd-agent amavisd-nanny amavisd-release |
200 |
.for f in amavisd.conf amavisd.conf-sample amavisd amavisd-agent amavisd-nanny amavisd-release |
145 |
@${REINPLACE_CMD} ${SED_SCRIPT} -e "s@'zoo'\]@['zoo','unzoo'] ]@" ${WRKSRC}/${f} |
201 |
@${REINPLACE_CMD} "s@'zoo'\]@['zoo','unzoo'] ]@" ${WRKSRC}/${f} |
|
|
202 |
.endfor |
203 |
.for i in amavisd.conf amavisd.conf-sample |
204 |
@${REINPLACE_CMD} -e "s|$daemon_user = \'vscan\';|$daemon_user = \'${AMAVISUSER}\';|" \ |
205 |
-e "s|$daemon_group = \'vscan\';|$daemon_group = \'${AMAVISGROUP}\';|" \ |
206 |
-e "s|/var/amavis|${AMAVISDIR}|" \ |
207 |
-e "s|/var/lib/amavis|${AMAVISDIR}|" \ |
208 |
-e 's|$$log_level = 2;|$$log_level = 0;|' \ |
209 |
-e "s|/var/virusmails|${AMAVISQUARANTINE}|" \ |
210 |
${WRKSRC}/${i} |
146 |
.endfor |
211 |
.endfor |
|
|
212 |
@${REINPLACE_CMD} "s|/var/amavis/db|${AMAVISDIR}/db|" ${WRKSRC}/amavisd-agent |
213 |
@${REINPLACE_CMD} "s|/var/amavis/db|${AMAVISDIR}/db|" ${WRKSRC}/amavisd-nanny |
214 |
@${REINPLACE_CMD} "s|#define HAVE_MKTEMP|#undef HAVE_MKTEMP|" \ |
215 |
${WRKSRC}/helper-progs/config.h.in |
216 |
@${REINPLACE_CMD} "s|/etc/amavisd.conf|${PREFIX}/etc/amavisd.conf|" \ |
217 |
${WRKSRC}/amavisd |
218 |
|
219 |
.if defined(AMAVIS_NOAMAVIS) |
220 |
do-configure: |
221 |
do-build: |
222 |
@${ECHO} libmilter not available, not building amavis-milter and amavis |
223 |
.endif |
147 |
|
224 |
|
148 |
pre-install: |
225 |
pre-install: |
149 |
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL |
226 |
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL |
Lines 155-175
Link Here
|
155 |
.if !defined(AMAVIS_NOMILTER) |
232 |
.if !defined(AMAVIS_NOMILTER) |
156 |
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin |
233 |
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin |
157 |
.endif |
234 |
.endif |
158 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd ${PREFIX}/sbin |
235 |
.if defined(WITH_P0F) |
159 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd-agent ${PREFIX}/sbin |
236 |
${INSTALL_SCRIPT} ${WRKSRC}/p0f-analyzer.pl ${PREFIX}/sbin |
160 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd-nanny ${PREFIX}/sbin |
|
|
161 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd-release ${PREFIX}/sbin |
162 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist |
163 |
.if !exists(${PREFIX}/etc/amavisd.conf) |
164 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf ${PREFIX}/etc |
165 |
.endif |
237 |
.endif |
|
|
238 |
.for i in amavisd amavisd-agent amavisd-nanny amavisd-release |
239 |
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/sbin |
240 |
.endfor |
241 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist |
166 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample |
242 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample |
167 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default |
243 |
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default |
|
|
244 |
.if !exists(${PREFIX}/etc/amavisd.conf) |
245 |
# |
246 |
# This can contain sensitive information, e.g. SQL passwords, so it should be handled |
247 |
# with care. |
248 |
# |
249 |
${INSTALL} -o root -g ${AMAVISGROUP} -m 640 ${WRKSRC}/amavisd.conf ${PREFIX}/etc |
250 |
.endif |
168 |
.if !defined(NOPORTDOCS) |
251 |
.if !defined(NOPORTDOCS) |
169 |
@${MKDIR} ${DOCSDIR} |
252 |
@${MKDIR} ${DOCSDIR} |
170 |
. for FILE in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/* |
253 |
.for i in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/* |
171 |
${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} |
254 |
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} |
172 |
. endfor |
255 |
.endfor |
173 |
.endif |
256 |
.endif |
174 |
|
257 |
|
175 |
post-install: |
258 |
post-install: |