2001-04-24 18:06:38 +00:00
|
|
|
# New ports collection makefile for: php_doc
|
|
|
|
# Date created: Sun Apr 22 14:51:32 CEST 2001
|
|
|
|
# Whom: Dirk Froemberg <dirk@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= php_doc
|
2002-11-11 20:13:37 +00:00
|
|
|
PORTVERSION= 1.20021101
|
2001-04-29 13:42:38 +00:00
|
|
|
CATEGORIES?= lang
|
2001-08-05 21:06:13 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
2001-11-25 16:49:25 +00:00
|
|
|
MASTER_SITE_SUBDIR= dirk
|
|
|
|
DISTNAME= php_manual_${PHP_LANG}
|
2001-04-24 18:06:38 +00:00
|
|
|
|
|
|
|
MAINTAINER= dirk@FreeBSD.org
|
2003-03-07 06:14:21 +00:00
|
|
|
COMMENT= PHP documentation in HTML
|
2001-04-24 18:06:38 +00:00
|
|
|
|
|
|
|
NO_BUILD= YES
|
|
|
|
NO_WRKSUBDIR= YES
|
2001-11-25 17:02:57 +00:00
|
|
|
SLAVEDIRS= french/php_doc german/php_doc japanese/php_doc
|
2001-11-25 16:49:25 +00:00
|
|
|
USE_BZIP2= YES
|
2001-04-24 18:06:38 +00:00
|
|
|
|
|
|
|
PHP_LANG?= en
|
|
|
|
PHPDOCDIR= ${PREFIX}/share/doc/php
|
|
|
|
|
|
|
|
.if ${PHP_LANG} != en
|
|
|
|
PKGNAMEPREFIX= ${PHP_LANG}-
|
|
|
|
PLIST= ${PKGDIR}/pkg-plist.${PHP_LANG}
|
|
|
|
PHPDOCDIR= ${PREFIX}/share/doc/${PHP_LANG}-php
|
2001-12-21 15:42:34 +00:00
|
|
|
|
2001-12-21 16:10:24 +00:00
|
|
|
.if ${PHP_LANG} == de
|
2002-11-11 20:13:37 +00:00
|
|
|
PORTVERSION= 1.20021103
|
2001-12-21 15:42:34 +00:00
|
|
|
.endif
|
2001-12-21 16:10:24 +00:00
|
|
|
.if ${PHP_LANG} == es
|
2002-11-11 20:13:37 +00:00
|
|
|
PORTVERSION= 1.20021104
|
2001-12-21 15:42:34 +00:00
|
|
|
.endif
|
2001-12-21 16:10:24 +00:00
|
|
|
.if ${PHP_LANG} == fr
|
2002-11-11 20:13:37 +00:00
|
|
|
PORTVERSION= 1.20020708
|
2001-12-21 15:42:34 +00:00
|
|
|
.endif
|
2001-12-21 16:10:24 +00:00
|
|
|
.if ${PHP_LANG} == ja
|
2002-11-11 20:13:37 +00:00
|
|
|
PORTVERSION= 1.20021104
|
2001-12-21 15:42:34 +00:00
|
|
|
.endif
|
2001-04-24 18:06:38 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
PLIST_SUB= PHPDOCDIR=${PHPDOCDIR:S/^${PREFIX}\///}
|
|
|
|
|
2001-04-29 13:31:34 +00:00
|
|
|
.if ${PHP_LANG} == en
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "You may set PHP_LANG to"
|
|
|
|
@${ECHO} " de (german),"
|
2001-11-25 17:02:57 +00:00
|
|
|
@${ECHO} " es (spanish),"
|
|
|
|
@${ECHO} " fr (french) or"
|
|
|
|
@${ECHO} " ja (japanese)"
|
2001-04-29 13:31:34 +00:00
|
|
|
@${ECHO} "to get a different language than the default one (english)."
|
|
|
|
@${ECHO}
|
|
|
|
.endif
|
|
|
|
|
2001-04-24 18:06:38 +00:00
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${PHPDOCDIR}
|
|
|
|
@for i in ${WRKSRC}/*; do \
|
|
|
|
${INSTALL_DATA} $$i ${PHPDOCDIR}; \
|
|
|
|
done
|
|
|
|
|
2001-08-05 21:06:13 +00:00
|
|
|
# this is for the maintainer only
|
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
LOCAL_DISTDIR?= /var/tmp/php_doc/php
|
|
|
|
LOCAL_TMPDIR?= /var/tmp/php_doc/tmp
|
2002-11-11 20:13:37 +00:00
|
|
|
DISTSITE?= http://de.php.net/distributions/manual/
|
2001-08-05 21:06:13 +00:00
|
|
|
|
|
|
|
localfetch:
|
2001-11-25 17:02:57 +00:00
|
|
|
.for lang in de en es fr ja
|
2001-11-25 16:49:25 +00:00
|
|
|
${MKDIR} ${LOCAL_DISTDIR}
|
|
|
|
[ -f ${LOCAL_DISTDIR}/php_manual_${lang}${EXTRACT_SUFX} ] || \
|
|
|
|
${FETCH_CMD} -o ${LOCAL_DISTDIR}/php_manual_${lang}${EXTRACT_SUFX} ${DISTSITE}php_manual_${lang}${EXTRACT_SUFX}
|
2001-08-05 21:06:13 +00:00
|
|
|
|
|
|
|
${MKDIR} ${LOCAL_TMPDIR}/${lang}
|
2001-11-25 16:49:25 +00:00
|
|
|
cd ${LOCAL_TMPDIR}/${lang} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${LOCAL_DISTDIR}/php_manual_${lang}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS}
|
2001-08-05 21:06:13 +00:00
|
|
|
|
|
|
|
(cd ${LOCAL_TMPDIR}/${lang} && /bin/ls -1) | ${PERL} -pe 'print "%%PHPDOCDIR%%/$_";' > ${.CURDIR}/pkg-plist.${lang}
|
2002-01-29 11:24:09 +00:00
|
|
|
${ECHO_CMD} "@dirrm %%PHPDOCDIR%%" >> ${.CURDIR}/pkg-plist.${lang}
|
2001-08-05 21:06:13 +00:00
|
|
|
${RM} -rf ${LOCAL_TMPDIR}/${lang}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
${MV} ${.CURDIR}/pkg-plist.en ${.CURDIR}/pkg-plist
|
2001-11-25 16:49:25 +00:00
|
|
|
cd ${LOCAL_DISTDIR} && ${MD5} php_manual_* > ${.CURDIR}/distinfo
|
2001-08-05 21:06:13 +00:00
|
|
|
.endif
|
|
|
|
|
2001-04-24 18:06:38 +00:00
|
|
|
.include <bsd.port.mk>
|