pkgsrc/www/php4/Makefile.module
jlam 1ea58d26e3 Change reachover references into another package's pkg/ directory into
references to the other package's base directory.  This is needed after
the files in the pkg/ directory were dispersed into the base directory.
2001-11-01 09:41:13 +00:00

62 lines
1.8 KiB
Makefile

# $NetBSD: Makefile.module,v 1.13 2001/11/01 09:41:14 jlam Exp $
#
# This Makefile is provided to ease creating PHP4 packages for the extension
# modules distributed in the PHP4 sources.
#
# Just include this file, define MODNAME, define PHP_PKG_VERS if necessary,
# add dependencies, and add the appropriate --with-configure-arg, then include
# bsd.pkg.mk.
#
# PHP_PKG_VERS should be of the form "nbX" and is used to indicate revisions
# of the PHP4 module package that don't affect other PHP4 modules. It is
# typically left empty.
.include "../../www/php4/Makefile.common"
PKGNAME= php-${MODNAME}-${PHP_VERS}
PHP_PKG_VERS?= # empty
BUILD_DEPENDS+= automake>=1.4:../../devel/automake
DEPENDS+= php>=${PHP_BASE_VERS}:../../www/php4
PKGMODNAME= ${MODNAME:S/-/_/}
MODULESDIR= ${WRKSRC}/modules
PLIST_SUBST+= MODNAME=${PKGMODNAME}
EXTRACT_ELEMENTS= ${DISTNAME}/ext/${PKGMODNAME}
WRKSRC= ${WRKDIR}/${EXTRACT_ELEMENTS}
PHPIZE?= ${BUILDLINK_PREFIX.php4}/bin/phpize
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --with-php-config=${PHP_CONFIG}
USE_CONFIG_WRAPPER= YES
USE_LIBTOOL= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
# Ensure we export symbols in the linked shared objects.
LDFLAGS+= -Wl,--export-dynamic
PLIST_SRC= ${.CURDIR}/../../www/php4/PLIST.module
MESSAGE_SRC= ${.CURDIR}/../../www/php4/MESSAGE.module
MESSAGE_SUBST+= MODNAME=${PKGMODNAME}
MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
pre-configure: phpize-module
phpize-module:
@cookie=${WRKDIR}/.phpize_module_done; \
if [ ! -f $${cookie} ]; then \
( cd ${WRKSRC} && ${PHPIZE} ); \
${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
fi
do-install: do-module-install
do-module-install:
${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR}
${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \
${PREFIX}/${PHP_EXTENSION_DIR}
.include "../../www/php4/buildlink.mk"