2001-04-24 20:06:38 +02: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
|
2008-08-04 05:57:42 +02:00
|
|
|
PORTVERSION= 20080804
|
2001-04-29 15:42:38 +02:00
|
|
|
CATEGORIES?= lang
|
2004-06-14 04:37:24 +02:00
|
|
|
MASTER_SITES= http://www.mavetju.org/download/adopted/
|
|
|
|
DISTNAME= php_manual_${PHP_LANG}-${PORTVERSION}
|
2001-04-24 20:06:38 +02:00
|
|
|
|
2004-06-14 04:37:24 +02:00
|
|
|
MAINTAINER= edwin@mavetju.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= PHP documentation in HTML
|
2001-04-24 20:06:38 +02:00
|
|
|
|
|
|
|
NO_BUILD= YES
|
|
|
|
NO_WRKSUBDIR= YES
|
2008-08-04 05:57:42 +02:00
|
|
|
SLAVEDIRS= french/php_doc \
|
2005-05-23 08:47:26 +02:00
|
|
|
german/php_doc \
|
|
|
|
japanese/php_doc \
|
|
|
|
polish/php_doc \
|
|
|
|
russian/php_doc
|
2001-04-24 20:06:38 +02:00
|
|
|
|
|
|
|
PHP_LANG?= en
|
2005-11-08 22:42:35 +01:00
|
|
|
PHP_LANGS= ${PHP_WRKDIR} ${PHP_WRKSRC}
|
2008-08-04 05:57:42 +02:00
|
|
|
PHP_WRKDIR= br de en fr pl ru
|
|
|
|
PHP_WRKSRC= ja
|
2004-06-14 04:37:24 +02:00
|
|
|
PHPDOCDIR= ${PREFIX}/share/doc/php-${PHP_LANG}
|
|
|
|
PLIST= ${WRKDIR}/pkg-plist
|
2001-04-24 20:06:38 +02:00
|
|
|
|
2005-11-08 22:42:35 +01:00
|
|
|
.for lang in ${PHP_WRKSRC}
|
2005-05-28 02:14:36 +02:00
|
|
|
.if ${PHP_LANG} == ${lang}
|
|
|
|
WRK_SRC= ${WRKDIR}
|
|
|
|
.endif
|
|
|
|
.endfor
|
2005-11-08 22:42:35 +01:00
|
|
|
.for lang in ${PHP_WRKDIR}
|
2005-05-28 02:14:36 +02:00
|
|
|
.if ${PHP_LANG} == ${lang}
|
|
|
|
WRK_SRC= ${WRKDIR}/html
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2004-06-14 04:37:24 +02:00
|
|
|
PKGNAMESUFFIX= -${PHP_LANG}
|
2001-04-24 20:06:38 +02:00
|
|
|
|
|
|
|
PLIST_SUB= PHPDOCDIR=${PHPDOCDIR:S/^${PREFIX}\///}
|
|
|
|
|
2001-04-29 15:31:34 +02:00
|
|
|
.if ${PHP_LANG} == en
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "You may set PHP_LANG to"
|
2004-06-15 01:27:54 +02:00
|
|
|
@${ECHO} " br (brazillian),"
|
2001-04-29 15:31:34 +02:00
|
|
|
@${ECHO} " de (german),"
|
2005-05-28 02:14:36 +02:00
|
|
|
@${ECHO} " en (english),"
|
2001-11-25 18:02:57 +01:00
|
|
|
@${ECHO} " fr (french) or"
|
|
|
|
@${ECHO} " ja (japanese)"
|
2004-07-03 14:54:52 +02:00
|
|
|
@${ECHO} " pl (polish)"
|
2005-05-23 08:10:03 +02:00
|
|
|
@${ECHO} " ru (russian)"
|
2001-04-29 15:31:34 +02:00
|
|
|
@${ECHO} "to get a different language than the default one (english)."
|
|
|
|
@${ECHO}
|
|
|
|
.endif
|
|
|
|
|
2004-06-14 04:37:24 +02:00
|
|
|
pre-install:
|
2005-05-28 02:14:36 +02:00
|
|
|
${FIND} ${WRK_SRC} -type f ! -name '.*' ! -name pkg-plist | ${SED} -e "s,${WRK_SRC},%%PHPDOCDIR%%," > ${PLIST}
|
|
|
|
${FIND} ${WRK_SRC} -type d | ${SORT} -r | ${SED} -e "s,${WRK_SRC},@dirrm %%PHPDOCDIR%%," >> ${PLIST}
|
2004-06-14 04:37:24 +02:00
|
|
|
|
2001-04-24 20:06:38 +02:00
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${PHPDOCDIR}
|
2005-05-28 02:14:36 +02:00
|
|
|
${FIND} ${WRK_SRC} -type d | ${SED} -e "s,${WRK_SRC},${PHPDOCDIR}/," | ${XARGS} ${MKDIR}
|
|
|
|
for f in `${FIND} ${WRK_SRC} -type f ! -name '.*' ! -name pkg-plist | ${SED} -e "s,${WRK_SRC}/,,"`; do \
|
|
|
|
${INSTALL_DATA} ${WRK_SRC}/$$f ${PHPDOCDIR}/$$f; \
|
2001-04-24 20:06:38 +02:00
|
|
|
done
|
|
|
|
|
2001-08-05 23:06:13 +02:00
|
|
|
# this is for the maintainer only
|
|
|
|
|
2006-02-09 05:20:56 +01:00
|
|
|
#
|
|
|
|
# php_manual_fr.html.gz
|
|
|
|
#
|
|
|
|
# Download the files from http://au.php.net/distributions/manual/
|
|
|
|
#
|
2005-11-08 22:42:35 +01:00
|
|
|
makesum:
|
|
|
|
@> ${MD5_FILE}
|
|
|
|
.for l in ${PHP_LANGS}
|
|
|
|
@f=php_manual_${l}-${PORTVERSION}${EXTRACT_SUFX}; \
|
|
|
|
${ECHO_CMD} makesum on $${f}; \
|
|
|
|
cd ${DISTDIR}; \
|
|
|
|
${MD5} $${f} >> ${MD5_FILE}; \
|
|
|
|
${SHA256} $${f} >> ${MD5_FILE}; \
|
|
|
|
${ECHO_CMD} "SIZE ($${f}) = "`${LS} -ALln $${f} | ${AWK} '{print $$5}'` >> ${MD5_FILE}
|
2001-08-05 23:06:13 +02:00
|
|
|
.endfor
|
|
|
|
|
2006-07-06 01:37:16 +02:00
|
|
|
fetchdist:
|
|
|
|
.for l in ${PHP_LANGS:S/br/pt_BR/}
|
2008-08-04 05:57:42 +02:00
|
|
|
# wget -c ftp://ftp.planetmirror.com/pub/php/distributions/manual/php_manual_${l}.tar.gz
|
|
|
|
wget -c ftp://pt.php.net/pub/php/distributions/manual/php_manual_${l}.tar.gz
|
2006-07-06 01:37:16 +02:00
|
|
|
if [ "${l}" = "pt_BR" ]; then \
|
|
|
|
${MV} php_manual_${l}.tar.gz ${DISTDIR}/php_manual_br-${PORTVERSION}.tar.gz; \
|
|
|
|
else \
|
|
|
|
${MV} php_manual_${l}.tar.gz ${DISTDIR}/php_manual_${l}-${PORTVERSION}.tar.gz; \
|
|
|
|
fi
|
|
|
|
.endfor
|
|
|
|
|
2001-04-24 20:06:38 +02:00
|
|
|
.include <bsd.port.mk>
|