freebsd-ports/security/drweb-postfix/Makefile
Daichi GOTO fd8dbf10ad update security/drweb-postfix: 4.29.12d -> 4.29.12f
PR:		55642
Submitted by:	zhuravlev alexander <zaa@ulstu.ru> (maintainer)
2003-08-18 06:26:44 +00:00

92 lines
2.7 KiB
Makefile

# New ports collection makefile for: drweb_postfix
# Date created: 5 December 2002
# Whom: zhuravlev alexander <zaa@ulstu.ru>
#
# $FreeBSD$
#
PORTNAME= drweb_postfix
PORTVERSION= 4.29.12f
CATEGORIES= security mail
MASTER_SITES= ftp://ftp.drweb.ru/pub/unix/
DISTNAME= drweb-clients-4.29.12-F-sources
MAINTAINER= zaa@ulstu.ru
COMMENT= Postfix message filter for virus processing through DrWeb daemon
RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/drweb-0.sh:${PORTSDIR}/security/drwebd
WRKSRC= ${WRKDIR}/${DISTNAME}
INST_PREFIX= ${PREFIX}/${PORTNAME}
DOC_DIR= ${PREFIX}/share/doc/drweb-postfix
LANGS=en-ru
CONFS=drweb_postfix users viruses addresses
TMPLS=archive-admin archive-sender error-admin error-sender skip-sender \
virus-admin virus-rcpts virus-sender rule-admin
DOCS=addresses_list.rus.txt addresses_list.txt conf_file.rus.txt \
conf_file.txt notify.rus.txt notify.txt readme readme.rus \
users_list.rus.txt users_list.txt viruses_list.rus.txt viruses_list.txt
post-patch:
cd ${WRKSRC} && \
${SED} "s#%PREFIX%#${PREFIX}#g" < dw_options.c > ndwo.c && \
${MV} ndwo.c dw_options.c
cd ${WRKSRC}/etc && \
${SED} -e "s#%PREFIX%#${PREFIX}#g" -e "s#%HOSTNAME%#${HOST}#g" \
< drweb_postfix.conf > nconf && \
${MV} nconf drweb_postfix.conf
post-configure:
cd ${WRKSRC} && { \
${ECHO_CMD} ${PORTVERSION}; \
${ECHO_CMD} n; \
${ECHO_CMD} n; \
${ECHO_CMD} n; \
${ECHO_CMD} n; \
${ECHO_CMD} y; \
${ECHO_CMD} n; \
${ECHO_CMD} n; \
${ECHO_CMD} y; \
${ECHO_CMD} ${CFLAGS} ; \
${ECHO_CMD} y; \
} | ./configure
do-install:
${MKDIR} ${DOC_DIR}
.for LANG in ${LANGS}
${MKDIR} ${PREFIX}/etc/drweb/templates/${LANG}/postfix
.endfor
.for CONF in ${CONFS}
${INSTALL_DATA} -m 640 -o drweb -g drweb ${WRKSRC}/etc/${CONF}.conf \
${PREFIX}/etc/drweb/${CONF}.conf-dist
if [ ! -f ${PREFIX}/etc/drweb/${CONF}.conf ]; then \
${INSTALL_DATA} -m 640 -o drweb -g drweb ${WRKSRC}/etc/${CONF}.conf \
${PREFIX}/etc/drweb/${CONF}.conf; \
fi
.endfor
.for LANG in ${LANGS}
.for TMPL in ${TMPLS}
cd ${WRKSRC}/etc/templates/${LANG}/postfix && \
${INSTALL_DATA} ${TMPL}.msg \
${PREFIX}/etc/drweb/templates/${LANG}/postfix/${TMPL}.msg-dist
if [ ! -f ${PREFIX}/etc/drweb/templates/${LANG}/postfix/${TMPL}.msg ]; then \
cd ${PREFIX}/etc/drweb/templates/${LANG}/postfix && \
${CP} ${TMPL}.msg-dist ${TMPL}.msg; \
fi
.endfor
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/drweb-postfix ${PREFIX}/sbin/
${INSTALL_PROGRAM} ${WRKSRC}/drwebdc ${PREFIX}/sbin/
cd ${WRKSRC}/doc/postfix && \
${INSTALL_DATA} ${DOCS} ${DOC_DIR}
post-install:
@${CAT} ${PKGMESSAGE}
@echo
@echo "Read documentation about additional Postfix tuning needed"
@echo "in ${DOC_DIR}."
@echo
.include <bsd.port.mk>