From ad84be56c57d7cdcfaa080a55074e4e19f7aa5a1 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Mon, 11 Jul 2011 09:36:59 +0000 Subject: [PATCH] Even more simplify pear channel code Add sanity checks for PEAR_CHANNEL_HOST and PEAR_CHANNEL_REG --- devel/pear-channel-horde/Makefile | 3 +-- devel/pear-channel-phpunit/Makefile | 3 +-- devel/pear/bsd.pear.channel.mk | 9 +++++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/devel/pear-channel-horde/Makefile b/devel/pear-channel-horde/Makefile index 427f8a69533d..b2ef152997d0 100644 --- a/devel/pear-channel-horde/Makefile +++ b/devel/pear-channel-horde/Makefile @@ -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 .include "${PORTSDIR}/devel/pear/bsd.pear.channel.mk" diff --git a/devel/pear-channel-phpunit/Makefile b/devel/pear-channel-phpunit/Makefile index 6091be27b556..4e612772e7c4 100644 --- a/devel/pear-channel-phpunit/Makefile +++ b/devel/pear-channel-phpunit/Makefile @@ -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 .include "${PORTSDIR}/devel/pear/bsd.pear.channel.mk" diff --git a/devel/pear/bsd.pear.channel.mk b/devel/pear/bsd.pear.channel.mk index adaeb272ee9c..3240b8cf70de 100644 --- a/devel/pear/bsd.pear.channel.mk +++ b/devel/pear/bsd.pear.channel.mk @@ -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}