summaryrefslogtreecommitdiff
path: root/www/php4/Makefile.module
blob: 1e92173c11fb91c6d73f9b5597fcafc57a295d54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $NetBSD: Makefile.module,v 1.3 2001/03/01 18:18:17 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.

.include "../../www/php4/Makefile.common"

PKGNAME=		php-${MODNAME}-${PHP_MODULE_VERS}
PHP_PKG_VERS?=		# empty
PHP_MODULE_VERS=	${PHP_BASE_VERS}${PHP_PKG_VERS}

DEPENDS+=		php-${PHP_VERS}:../../www/php4

EXTDIR=			${WRKSRC}/ext/${MODNAME}
MODULESDIR=		${WRKSRC}/modules
PLIST_SUBST+=		MODNAME=${MODNAME}

MESSAGE_SRC=		${.CURDIR}/../../www/php4/pkg/MESSAGE.module
MESSAGE_SUBST+=		MODNAME=${MODNAME}				\
			PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}

PLIST_SRC=		${.CURDIR}/../../www/php4/pkg/PLIST.module

do-build:
	@cd ${EXTDIR}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${ALL_TARGET}

do-install: do-module-install

do-module-install:
	${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR}
	${INSTALL_DATA} ${MODULESDIR}/${MODNAME}.so			\
		${PREFIX}/${PHP_EXTENSION_DIR}