diff options
author | heinz <heinz> | 2009-08-09 21:15:31 +0000 |
---|---|---|
committer | heinz <heinz> | 2009-08-09 21:15:31 +0000 |
commit | 5aff9e35c7c38284614270168cada8cd48324a59 (patch) | |
tree | d8786bbad4e272b8da888612c66e6d342c728481 /mail/postfix | |
parent | 05949828410cc2c36be48f3b15f381a3d34063fb (diff) | |
download | pkgsrc-5aff9e35c7c38284614270168cada8cd48324a59.tar.gz |
Enabled installation to DESTDIR. (OK by martti@).
Diffstat (limited to 'mail/postfix')
-rw-r--r-- | mail/postfix/Makefile | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 19a3f85409f..c87f1be7ac2 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.228 2009/06/04 14:08:56 martti Exp $ +# $NetBSD: Makefile,v 1.229 2009/08/09 21:15:31 heinz Exp $ DISTNAME= postfix-2.6.2 #PKGREVISION= 1 @@ -16,6 +16,7 @@ LICENSE= postfix-license CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* +PKG_DESTDIR_SUPPORT= user-destdir PKG_INSTALLATION_TYPES= overwrite pkgviews USE_TOOLS+= perl @@ -125,7 +126,7 @@ CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} CONF_FILES_PERMS= # empty .for i in post-install postfix-script CONF_FILES_PERMS+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} \ - ${ROOT_USER} ${ROOT_GROUP} 755 + ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755 .endfor MAKE_ENV+= DEBUG= # empty @@ -135,6 +136,12 @@ SUBST_FILES.paths= ${WRKDIR}/mailer.conf SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' SUBST_STAGE.paths= post-patch +.if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) +DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}" +.endif + +INSTALLATION_DIRS+= ${LIBEXECDIR} ${EXAMPLEDIR} ${DOCDIR} + post-extract: cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix @@ -150,21 +157,19 @@ post-build: .endif do-install: - ${INSTALL_DATA_DIR} ${LIBEXECDIR} - ${INSTALL_DATA_DIR} ${EXAMPLEDIR} - ${INSTALL_DATA_DIR} ${DOCDIR} rm -f ${WRKSRC}/conf/*.orig .if !empty(PKG_OPTIONS:Msasl) - ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR} + ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR} .endif - ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR} - ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf cd ${WRKSRC} && sh ./postfix-install -non-interactive \ - config_directory="${EXAMPLEDIR}" + ${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}" + ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${DESTDIR}${EXAMPLEDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${DESTDIR}${EXAMPLEDIR} + ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ + ${DESTDIR}${EXAMPLEDIR}/mailer.conf ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \ - ${PREFIX}/sbin/qshape + ${DESTDIR}${PREFIX}/sbin/qshape ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \ - ${PREFIX}/${PKGMANDIR}/man1 + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 .include "../../mk/bsd.pkg.mk" |