The package supports installation to DESTDIR.

This commit is contained in:
heinz 2007-06-11 15:24:43 +00:00
parent f5133279d1
commit 8be9331ae2

View file

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.77 2007/05/06 19:50:18 adrianp Exp $
# $NetBSD: Makefile,v 1.78 2007/06/11 15:24:43 heinz Exp $
PKGNAME= php-${PHP_BASE_VERS}
CATEGORIES+= lang
COMMENT= HTML-embedded scripting language
PKG_DESTDIR_SUPPORT= user-destdir
CONFLICTS+= ap-php-4.0.3pl1
# PHP uses libtool inconsistently for CGI/CLI build; don't sanify for now
@ -29,6 +31,8 @@ CGIDIR= ${PREFIX}/libexec/cgi-bin
EGDIR= ${PREFIX}/share/examples/php
MESSAGE_SUBST+= CGIDIR=${CGIDIR:Q}
MAKE_ENV+= INSTALL_ROOT=${DESTDIR}
# On NetBSD ELF platforms, we need to link libgcc.a whole-archive so that
# certain symbols from the C++ implementation (__get_eh_context, etc.)
# referenced by DSOs written in C++ will resolve correctly. We need to
@ -48,13 +52,16 @@ CONF_FILES= ${EGDIR}/php.ini-recommended ${PKG_SYSCONFDIR}/php.ini
OWN_DIRS= ${PREFIX}/${PHP_EXTENSION_DIR}
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${PREFIX}/bin/php
${INSTALL_DATA} ${WRKSRC}/sapi/cli/php.1 ${PREFIX}/${PKGMANDIR}/man1/php.1
${INSTALL_DATA_DIR} ${CGIDIR}
${INSTALL_PROGRAM} ${WRKSRC}/sapi/cgi/php ${CGIDIR}
${INSTALL_DATA_DIR} ${EGDIR}
cd ${WRKSRC}; ${INSTALL_DATA} php.ini-dist php.ini-recommended ${EGDIR}
${INSTALL_DATA_DIR} ${PREFIX}/share/php
${INSTALL_DATA} ${WRKSRC}/php.gif ${PREFIX}/share/php
${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php \
${DESTDIR:Q}${PREFIX:Q}/bin/php
${INSTALL_DATA} ${WRKSRC}/sapi/cli/php.1 \
${DESTDIR:Q}${PREFIX:Q}/${PKGMANDIR}/man1/php.1
${INSTALL_DATA_DIR} ${DESTDIR:Q}${CGIDIR:Q}
${INSTALL_PROGRAM} ${WRKSRC}/sapi/cgi/php ${DESTDIR:Q}${CGIDIR:Q}
${INSTALL_DATA_DIR} ${DESTDIR:Q}${EGDIR:Q}
cd ${WRKSRC}; ${INSTALL_DATA} php.ini-dist php.ini-recommended \
${DESTDIR:Q}${EGDIR:Q}
${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/php
${INSTALL_DATA} ${WRKSRC}/php.gif ${DESTDIR:Q}${PREFIX:Q}/share/php
.include "../../mk/bsd.pkg.mk"