1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00
freebsd-ports/mail/postgrey/Makefile
Pawel Pekala ea2f6e254b - Update to version 1.35
- Add LICENSE
- Remove pkg-install script, move directory creation to pkg-plist
- Use @sample keyword for config files

PR:		194019
Submitted by:	TEUBEL Györg y<tgyurci@gmail.com>
Approved by:	maintainer
2014-11-05 17:35:38 +00:00

86 lines
2.4 KiB
Makefile

# Created by: Will Andrews <will@FreeBSD.org>
# $FreeBSD$
PORTNAME= postgrey
PORTVERSION= 1.35
CATEGORIES= mail
MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
http://postgrey.schweikert.ch/pub/old/
MAINTAINER= ports.maintainer@evilphi.com
COMMENT= Greylisting policy server for Postfix
LICENSE= GPLv2
RUN_DEPENDS= p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
p5-IO-Multiplex>=0:${PORTSDIR}/devel/p5-IO-Multiplex \
p5-Parse-Syslog>=0:${PORTSDIR}/textproc/p5-Parse-Syslog \
p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB \
p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS
USE_PERL5= run
USE_RC_SUBR= ${PORTNAME}
NO_BUILD= yes
POD2MAN?= pod2man
PORTDOCS= README Changes README.exim
PG_DBDIR?= /var/db/postgrey
PG_GROUP?= postgrey
PG_RUNDIR?= /var/run/postgrey
PG_USER?= postgrey
SUB_LIST= PG_DBDIR=${PG_DBDIR} \
PG_RUNDIR=${PG_RUNDIR}
PLIST_SUB+= PG_DBDIR=${PG_DBDIR} \
PG_GROUP=${PG_GROUP} \
PG_RUNDIR=${PG_RUNDIR} \
PG_USER=${PG_USER}
USERS= ${PG_USER}
GROUPS= ${PG_GROUP}
MANPAGES= postgrey.1 policy-test.1 postgreyreport.1
ETCFILES= whitelist_clients whitelist_recipients
USE_RC_SUBR= postgrey
USES= shebangfix perl5
SHEBANG_FILES= postgrey policy-test contrib/postgreyreport
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's#nogroup#${PG_GROUP}#' \
-e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' \
${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PG_DBDIR}#' \
${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
do-install:
${POD2MAN} ${WRKSRC}/postgrey ${WRKSRC}/postgrey.1
${POD2MAN} ${WRKSRC}/policy-test ${WRKSRC}/policy-test.1
${POD2MAN} ${WRKSRC}/contrib/postgreyreport ${WRKSRC}/postgreyreport.1
${INSTALL_SCRIPT} ${WRKSRC}/postgrey ${STAGEDIR}${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/policy-test ${STAGEDIR}${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/contrib/postgreyreport \
${STAGEDIR}${PREFIX}/sbin
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/postfix ${STAGEDIR}/${PG_DBDIR} \
${STAGEDIR}/${PG_RUNDIR}
.for i in ${ETCFILES}
${INSTALL_DATA} ${WRKSRC}/postgrey_${i} \
${STAGEDIR}${PREFIX}/etc/postfix/postgrey_${i}.sample
.endfor
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
@cd ${WRKSRC} && \
${INSTALL_MAN} ${MANPAGES} ${STAGEDIR}${MANPREFIX}/man/man1
.include <bsd.port.mk>