aboutsummaryrefslogtreecommitdiffstats
path: root/security/drweb-sendmail/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/drweb-sendmail/Makefile')
-rw-r--r--security/drweb-sendmail/Makefile101
1 files changed, 53 insertions, 48 deletions
diff --git a/security/drweb-sendmail/Makefile b/security/drweb-sendmail/Makefile
index 3a5ce8e32f64..6f0a0dd90bc5 100644
--- a/security/drweb-sendmail/Makefile
+++ b/security/drweb-sendmail/Makefile
@@ -6,77 +6,82 @@
#
PORTNAME= drweb-sendmail
-PORTVERSION= 4.32.1
+PORTVERSION= 4.33
CATEGORIES= security mail
-MASTER_SITES= ftp://ftp.drweb.ru/pub/unix/FreeBSD/49/ \
- ftp://ftp.drweb.ru/pub/unix/FreeBSD/53/
+MASTER_SITES= ftp://ftp.drweb.ru/pub/drweb/unix/FreeBSD/411/:f411 \
+ ftp://ftp.drweb.ru/pub/drweb/unix/FreeBSD/54/:f54 \
+ http://freebsd.spectrum.ru/distfiles/:f411,f54
-MAINTAINER= support@spectrum.ru
-COMMENT= Sendmail message filter for virus processing through DrWeb daemon
+MAINTAINER= support@spectrum.ru
+COMMENT= Sendmail message filter for virus processing through DrWeb daemon
-RUN_DEPENDS= ${LOCALBASE}/drweb/drwebd:${PORTSDIR}/security/drweb \
- /usr/include/libmilter/mfapi.h:${PORTSDIR}/mail/sendmail
+RUN_DEPENDS= ${LOCALBASE}/drweb/drwebd:${PORTSDIR}/security/drweb
+ONLY_FOR_ARCHS= i386
NO_BUILD= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
-DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd49
+DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd411
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:f411
.else
-DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd53
+DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd54
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:f54
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}
-INST_PREFIX= ${PREFIX}/${PORTNAME}
-DOC_DIR= ${PREFIX}/share/doc/${PORTNAME}
-CONFDIR= ${PREFIX}/etc/${PORTNAME}
+INST_PREFIX= ${PREFIX}/drweb
+CONF_PREFIX= ${PREFIX}/etc/drweb
-LANGS= en en-ru en-pl en-jp
-CONFS= drweb_smf users viruses addresses
-TMPLS= archive-admin archive-sender cured-admin cured-sender error-admin \
- error-sender rule-admin skip-sender virus-admin virus-rcpts virus-sender \
- license-admin
+LANGS= en en-pl en-ru
+CONFS= addresses drweb_smf users viruses
+TMPLS= admin_archive admin_cured admin_error admin_license admin_malware \
+ admin_rule admin_virus rcpts_malware rcpts_virus sender_archive \
+ sender_cured sender_error sender_malware sender_skip sender_virus
do-install:
- ${MKDIR} ${INST_PREFIX}
- ${MKDIR} ${INST_PREFIX}/run
- ${CHOWN} drweb:drweb ${INST_PREFIX}/run
- ${MKDIR} ${CONFDIR}
- ${MKDIR} ${DOC_DIR}
- ${MKDIR} ${DOC_DIR}/sendmail
- ${INSTALL_PROGRAM} ${WRKSRC}/usr/local/drweb/drweb-smf.static \
- ${INST_PREFIX}/drweb-smf
- ${SED} 's#%INSTALL%#${INST_PREFIX}#g' \
- < ${FILESDIR}/01.drweb-smf.sh \
- > ${PREFIX}/etc/rc.d/01.drweb-smf.sh-dist
- ${CHMOD} 750 ${PREFIX}/etc/rc.d/01.drweb-smf.sh-dist
-.for LANG in ${LANGS}
- ${MKDIR} ${PREFIX}/etc/${PORTNAME}/templates/${LANG}/sendmail
-.endfor
+ ${INSTALL_PROGRAM} -m 0750 -o drweb -g drweb \
+ ${WRKSRC}${LOCALBASE}/drweb/drweb-smf.static ${INST_PREFIX}/drweb-smf
.for CONF in ${CONFS}
- ${SED} 's#%CONFDIR%#${CONFDIR}#g' \
- < ${WRKSRC}/usr/local/etc/drweb/${CONF}.conf \
- > ${CONFDIR}/${CONF}.conf-dist
- ${CHMOD} 640 ${CONFDIR}/${CONF}.conf-dist
-.if !exists( ${PREFIX}/etc/${PORTNAME}/${CONF}.conf )
- ${CP} ${CONFDIR}/${CONF}.conf-dist ${CONFDIR}/${CONF}.conf
- ${CHMOD} 600 ${CONFDIR}/${CONF}.conf
+ ${SED} -e s#/usr/local/drweb/run#/var/drweb/run#g \
+ < ${WRKSRC}${LOCALBASE}/etc/drweb/${CONF}.conf > \
+ ${CONF_PREFIX}/${CONF}.conf-distr
+.if !exists( ${CONF_PREFIX}/${CONF}.conf )
+ ${CP} ${CONF_PREFIX}/${CONF}.conf-distr ${CONF_PREFIX}/${CONF}.conf
.endif
.endfor
.for LANG in ${LANGS}
+ ${MKDIR} ${CONF_PREFIX}/templates/${LANG}/sendmail
+.endfor
+.for LANG in ${LANGS}
.for TMPL in ${TMPLS}
- ${INSTALL_DATA} ${WRKSRC}/usr/local/etc/drweb/templates/${LANG}/sendmail/${TMPL}.msg \
- ${PREFIX}/etc/${PORTNAME}/templates/${LANG}/sendmail/${TMPL}.msg-dist
-.if !exists( ${PREFIX}/etc/${PORTNAME}/templates/${LANG}/sendmail/${TMPL}.msg )
- ${INSTALL_DATA} -o drweb -g drweb -m 640 ${WRKSRC}/usr/local/etc/drweb/templates/${LANG}/sendmail/${TMPL}.msg \
- ${PREFIX}/etc/${PORTNAME}/templates/${LANG}/sendmail/${TMPL}.msg
+ ${INSTALL} -m 0640 -o drweb -g drweb ${WRKSRC}${LOCALBASE}/etc/drweb/templates/${LANG}/${TMPL}.msg \
+ ${CONF_PREFIX}/templates/${LANG}/sendmail/${TMPL}.msg-distr
+.if !exists( ${CONF_PREFIX}/templates/${LANG}/aendmail/${TMPL}.msg )
+ ${CP} ${CONF_PREFIX}/templates/${LANG}/sendmail/${TMPL}.msg-distr \
+ ${CONF_PREFIX}/templates/${LANG}/sendmail/${TMPL}.msg
.endif
.endfor
.endfor
- ${CP} ${WRKSRC}/usr/local/drweb/doc/sendmail/*.txt \
- ${DOC_DIR}/sendmail/
- ${CP} ${WRKSRC}/usr/local/drweb/doc/sendmail/read* \
- ${DOC_DIR}/sendmail/
+ ${SED} -e s#___T_FILTER_PATH___#${INST_PREFIX}/drweb-smf#g \
+ -e s#___T_FILTER_UNIX___#yes#g \
+ -e s#___T_FILTER_SOCKET___#no#g \
+ -e s#___T_FILTER_PARAMS___##g \
+ < ${WRKSRC}${LOCALBASE}/drweb/doc/sendmail/template.initscript > \
+ ${PREFIX}/etc/rc.d/002.drweb-smf.sh
+ ${CHMOD} +x ${PREFIX}/etc/rc.d/002.drweb-smf.sh
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${TAR} -cf - -C ${WRKSRC}${LOCALBASE}/drweb/doc/sendmail . | \
+ ${TAR} -xf - -C ${DOCSDIR} --exclude "configure*" \
+ --exclude "*.patch" --exclude "template.*"
+.endif
+ @${ECHO}
+ @${ECHO} "Read documentation about additional Sendmail tuning needed"
+ @${ECHO} "in ${DOCSDIR}."
+ @${ECHO}
.include <bsd.port.post.mk>