freebsd-ports/devel/pear/bsd.pear.channel.mk
Martin Matuska ad84be56c5 Even more simplify pear channel code
Add sanity checks for PEAR_CHANNEL_HOST and PEAR_CHANNEL_REG
2011-07-11 09:36:59 +00:00

36 lines
1.1 KiB
Makefile

# $FreeBSD$
#
# Common code for PEAR channels
PKGNAMEPREFIX?= pear-channel-
MASTER_SITES?= #no master sites
DISTFILES?= #no distfiles
BUILD_DEPENDS?= ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear
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 \
${LPEARDIR}/.channels/${PEAR_CHANNEL_HOST}.reg \
"@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}
@${INSTALL_DATA} ${PEAR_CHANNEL_REG} \
${PREFIX}/${LPEARDIR}/.channels/
@${ECHO_CMD} -n ${PEAR_CHANNEL_HOST} > \
${PREFIX}/${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt