1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix package installation; pre-install part of script depends on postgrey

username existing.

PR:		ports/166943
Submitted by:	Darren Pilgrim <ports.maintainer@evilphi.com> (maintainer)

- While here, use packages for perl dependencies to avoid requiring bsd.perl.mk

Approved by:	Darren Pilgrim <ports.maintainer@evilphi.com> (maintainer)
This commit is contained in:
Chris Rees 2012-04-18 07:54:30 +00:00
parent 5682ce6fc5
commit fd4a2cbe49
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=294995
2 changed files with 15 additions and 12 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= postgrey
PORTVERSION= 1.34
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
http://postgrey.schweikert.ch/pub/old/
@ -15,11 +15,11 @@ MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
MAINTAINER= ports.maintainer@evilphi.com
COMMENT= Greylisting policy server for Postfix
RUN_DEPENDS= ${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \
${SITE_PERL}/IO/Multiplex.pm:${PORTSDIR}/devel/p5-IO-Multiplex \
${SITE_PERL}/Parse/Syslog.pm:${PORTSDIR}/textproc/p5-Parse-Syslog \
${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB \
${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS
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= yes
USE_RC_SUBR= ${PORTNAME}
@ -46,8 +46,10 @@ post-patch:
@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
do-install:
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${POD2MAN} ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.1
@${POD2MAN} ${WRKSRC}/policy-test ${WRKSRC}/policy-test.1
@${POD2MAN} ${WRKSRC}/contrib/postgreyreport ${WRKSRC}/postgreyreport.1

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.5 2011-11-10 06:45:45 mm Exp $
# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.6 2012-04-18 07:54:30 crees Exp $
PATH=/bin:/usr/bin:/usr/sbin
@ -16,6 +16,11 @@ PRE-INSTALL)
exit 1
fi
;;
POST-INSTALL)
echo "---> Starting post-install script:"
# Create home directory if required
if [ -d "%%POSTGREYDIR%%" ]; then
echo "---> Using existing Postgrey database directory (%%POSTGREYDIR%%)"
@ -27,10 +32,6 @@ PRE-INSTALL)
/usr/sbin/chown -R "%%USER%%:%%GROUP%%" "%%POSTGREYDIR%%" || exit 1
/bin/chmod g+s "%%POSTGREYDIR%%" || exit 1
fi
;;
POST-INSTALL)
echo "---> Starting post-install script:"
for i in %%ETCFILES%%; do
if [ ! -f "%%PREFIX%%/etc/postfix/postgrey_${i}" ]; then