2019-09-07 19:13:56 +02:00
|
|
|
# $NetBSD: Makefile,v 1.51 2019/09/07 17:13:56 kim Exp $
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2015-09-02 20:42:11 +02:00
|
|
|
DISTNAME= postgrey-1.36
|
2019-09-07 19:13:56 +02:00
|
|
|
PKGREVISION= 6
|
2004-12-22 16:51:38 +01:00
|
|
|
CATEGORIES= mail
|
2008-01-20 22:08:01 +01:00
|
|
|
MASTER_SITES= http://postgrey.schweikert.ch/pub/
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2019-09-07 19:13:56 +02:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2008-01-20 22:08:01 +01:00
|
|
|
HOMEPAGE= http://postgrey.schweikert.ch/
|
2004-12-22 16:51:38 +01:00
|
|
|
COMMENT= Postfix Greylist Policy Server
|
2013-07-14 23:57:09 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
2004-12-22 16:51:38 +01:00
|
|
|
|
|
|
|
DEPENDS+= p5-BerkeleyDB-[0-9]*:../../databases/p5-BerkeleyDB
|
|
|
|
DEPENDS+= p5-IO-Multiplex-[0-9]*:../../devel/p5-IO-Multiplex
|
|
|
|
DEPENDS+= p5-Net-Server-[0-9]*:../../net/p5-Net-Server
|
2015-10-12 13:10:34 +02:00
|
|
|
DEPENDS+= p5-NetAddr-IP-[0-9]*:../../net/p5-NetAddr-IP
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2010-06-02 15:05:50 +02:00
|
|
|
BDB_ACCEPTED= db4 db5
|
|
|
|
NO_CONFIGURE= yes
|
|
|
|
USE_TOOLS+= perl:run
|
2004-12-22 16:51:38 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2014-09-10 15:20:16 +02:00
|
|
|
.include "options.mk"
|
2004-12-22 16:51:38 +01:00
|
|
|
|
|
|
|
POSTGREY_USER?= postgrey
|
|
|
|
POSTGREY_GROUP?= postgrey
|
|
|
|
POSTGREY_DBDIR?= ${VARBASE}/db/${PKGBASE}
|
|
|
|
|
2015-10-12 13:10:34 +02:00
|
|
|
PKG_SYSCONFSUBDIR= postfix
|
2004-12-22 16:51:38 +01:00
|
|
|
|
|
|
|
DOCDIR= share/doc/${PKGBASE}
|
|
|
|
EGDIR= share/examples/${PKGBASE}
|
|
|
|
|
|
|
|
RCD_SCRIPTS= postgrey
|
|
|
|
PKG_GROUPS= ${POSTGREY_GROUP}
|
2006-04-23 02:12:35 +02:00
|
|
|
PKG_USERS= ${POSTGREY_USER}:${POSTGREY_GROUP}
|
2007-07-04 22:54:31 +02:00
|
|
|
PKG_GROUPS_VARS+= POSTGREY_GROUP
|
|
|
|
PKG_USERS_VARS+= POSTGREY_USER
|
2006-04-23 02:12:35 +02:00
|
|
|
|
|
|
|
PKG_GECOS.${POSTGREY_USER}= Postgrey Daemon User
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2007-07-04 22:54:31 +02:00
|
|
|
BUILD_DEFS+= POSTGREY_DBDIR VARBASE
|
2007-04-02 15:35:08 +02:00
|
|
|
|
2004-12-22 16:51:38 +01:00
|
|
|
.for i in postgrey_whitelist_clients postgrey_whitelist_recipients
|
2005-04-17 18:08:39 +02:00
|
|
|
CONF_FILES+= ${PREFIX}/${EGDIR}/${i} \
|
|
|
|
${PKG_SYSCONFDIR}/${i}
|
2004-12-22 16:51:38 +01:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
OWN_DIRS_PERMS+= ${POSTGREY_DBDIR} \
|
|
|
|
${POSTGREY_USER} ${POSTGREY_GROUP} 0775
|
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
FILES_SUBST+= PERL=${PERL5:Q}
|
2014-03-11 15:34:36 +01:00
|
|
|
FILES_SUBST+= POSTGREY_USER=${POSTGREY_USER}
|
|
|
|
FILES_SUBST+= POSTGREY_GROUP=${POSTGREY_GROUP}
|
|
|
|
FILES_SUBST+= POSTGREY_DBDIR=${POSTGREY_DBDIR}
|
2004-12-22 16:51:38 +01:00
|
|
|
|
|
|
|
SUBST_CLASSES+= postgrey
|
|
|
|
SUBST_STAGE.postgrey= pre-build
|
|
|
|
SUBST_FILES.postgrey= postgrey
|
|
|
|
# Perl
|
|
|
|
SUBST_SED.postgrey= -e 's,/usr/bin/perl,${PERL5},g'
|
|
|
|
# User
|
|
|
|
SUBST_SED.postgrey+= -e "s,|| 'postgrey',|| '${POSTGREY_USER}',g"
|
|
|
|
SUBST_SED.postgrey+= -e "s,default: postgrey,default: ${POSTGREY_USER},g"
|
|
|
|
SUBST_SED.postgrey+= -e "s,C<postgrey>,C<${POSTGREY_USER}>,g"
|
|
|
|
# Group
|
|
|
|
SUBST_SED.postgrey+= -e "s,|| 'nogroup',|| '${POSTGREY_GROUP}',g"
|
|
|
|
SUBST_SED.postgrey+= -e "s,default: nogroup,default: ${POSTGREY_GROUP},g"
|
|
|
|
# Database
|
|
|
|
SUBST_SED.postgrey+= -e 's,/var/spool/postfix/postgrey,${POSTGREY_DBDIR},g'
|
|
|
|
# Config
|
|
|
|
SUBST_SED.postgrey+= -e 's,/etc/postfix,${PKG_SYSCONFDIR},g'
|
|
|
|
#
|
2006-02-19 02:01:39 +01:00
|
|
|
SUBST_MESSAGE.postgrey= Fixing defaults.
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2014-06-12 15:31:44 +02:00
|
|
|
INSTALLATION_DIRS+= sbin ${DOCDIR} ${EGDIR}
|
2004-12-22 16:51:38 +01:00
|
|
|
|
2007-04-03 16:02:07 +02:00
|
|
|
do-build:
|
|
|
|
|
2004-12-22 16:51:38 +01:00
|
|
|
do-install:
|
2008-03-04 18:57:17 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/postgrey ${DESTDIR}${PREFIX}/sbin/postgrey
|
2004-12-22 16:51:38 +01:00
|
|
|
.for i in COPYING Changes README
|
2008-03-04 18:57:17 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/${DOCDIR}/${i}
|
2004-12-22 16:51:38 +01:00
|
|
|
.endfor
|
|
|
|
.for i in postgrey_whitelist_clients postgrey_whitelist_recipients
|
2008-03-04 18:57:17 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/${EGDIR}/${i}
|
2004-12-22 16:51:38 +01:00
|
|
|
.endfor
|
|
|
|
|
2010-06-02 15:05:50 +02:00
|
|
|
.include "../../mk/bdb.buildlink3.mk"
|
2004-12-22 16:51:38 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|