freebsd-ports/devel/pear/bsd.pear.channel.mk
Mathieu Arnold a1993564e0 Introduce PHP flavors.
Ports using USES=php:phpize, php:ext, php:zend, and php:pecl are now
  flavored.  They will automatically get flavors (php56, php70, php71, php72)
  depending of the versions they support (set with IGNORE_WITH_PHP).  As a
  consequence, ports using USES=pear and USES=horde are also flavored.

PR:		226242
Submitted by:	mat
Exp-run by:	antoine
Approved by:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D14208
2018-03-08 19:48:41 +00:00

38 lines
1.1 KiB
Makefile

# $FreeBSD$
#
# Common code for PEAR channels
PKGNAMEPREFIX?= ${PEAR_PKGNAMEPREFIX}channel-
MASTER_SITES?= #no master sites
DISTFILES?= #no distfiles
USES+= pear:env
BUILD_DEPENDS?= ${LOCALBASE}/bin/pear:devel/pear@${PHP_FLAVOR}
RUN_DEPENDS?= ${LOCALBASE}/bin/pear:devel/pear@${PHP_FLAVOR}
NO_BUILD?= yes
LPEARDIR?= share/pear
PEAR_CHANNEL_ALIAS?= ${PORTNAME}
PEAR_CHANNEL_REG?= ${.CURDIR}/files/${PEAR_CHANNEL_HOST}.reg
PLIST_FILES= ${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt \
${LPEARDIR}/.channels/${PEAR_CHANNEL_HOST}.reg
PLIST_DIRS= ${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST}
.if !defined(PEAR_CHANNEL_HOST)
IGNORE= Please set PEAR_CHANNEL_HOST
.elif !exists(${PEAR_CHANNEL_REG})
IGNORE= Cannot find registry file: ${PEAR_CHANNEL_REG}
.endif
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels/.alias
@${MKDIR} ${STAGEDIR}${PREFIX}/${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST}
@${INSTALL_DATA} ${PEAR_CHANNEL_REG} \
${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels
@${ECHO_CMD} -n ${PEAR_CHANNEL_HOST} > \
${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt