Even more simplify pear channel code

Add sanity checks for PEAR_CHANNEL_HOST and PEAR_CHANNEL_REG
This commit is contained in:
Martin Matuska 2011-07-11 09:36:59 +00:00
parent ae0e665ce2
commit ad84be56c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277523
3 changed files with 11 additions and 4 deletions

View file

@ -5,7 +5,7 @@
# $FreeBSD$
#
PORTNAME= pear-channel-horde
PORTNAME= horde
PORTVERSION= 20110304
CATEGORIES= devel www pear
@ -13,7 +13,6 @@ MAINTAINER= mm@FreeBSD.org
COMMENT= PEAR channel ${PEAR_CHANNEL_HOST}
PEAR_CHANNEL_HOST= pear.horde.org
PEAR_CHANNEL_ALIAS= horde
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/devel/pear/bsd.pear.channel.mk"

View file

@ -5,7 +5,7 @@
# $FreeBSD$
#
PORTNAME= pear-channel-phpunit
PORTNAME= phpunit
PORTVERSION= 20110327
CATEGORIES= devel www pear
@ -13,7 +13,6 @@ MAINTAINER= mm@FreeBSD.org
COMMENT= PEAR channel ${PEAR_CHANNEL_HOST}
PEAR_CHANNEL_HOST= pear.phpunit.de
PEAR_CHANNEL_ALIAS= phpunit
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/devel/pear/bsd.pear.channel.mk"

View file

@ -2,6 +2,8 @@
#
# Common code for PEAR channels
PKGNAMEPREFIX?= pear-channel-
MASTER_SITES?= #no master sites
DISTFILES?= #no distfiles
@ -11,6 +13,8 @@ RUN_DEPENDS?= ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear
NO_BUILD?= yes
LPEARDIR?= share/pear
PEAR_CHANNEL_ALIAS?= ${PORTNAME}
PEAR_CHANNEL_REG?= ${FILESDIR}/${PEAR_CHANNEL_HOST}.reg
PLIST_FILES= ${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt \
@ -18,6 +22,11 @@ PLIST_FILES= ${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt \
"@exec ${MKDIR} %D/${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST}"
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} ${PREFIX}/${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST}