1999-06-02 12:13:25 +02:00
|
|
|
# New ports collection makefile for: python-doc
|
|
|
|
# Date created: 12 May 1999
|
2003-06-04 10:38:41 +02:00
|
|
|
# Whom: Thomas Gellekum <tg@FreeBSD.org>
|
1999-06-02 12:13:25 +02:00
|
|
|
#
|
1999-08-25 08:35:40 +02:00
|
|
|
# $FreeBSD$
|
1999-06-02 12:13:25 +02:00
|
|
|
#
|
|
|
|
|
2000-04-12 08:21:15 +02:00
|
|
|
PORTNAME= python-doc-${DOCFORMAT}
|
2001-03-15 13:29:01 +01:00
|
|
|
PORTVERSION= ${PYTHON_PORTVERSION}
|
1999-06-02 12:13:25 +02:00
|
|
|
CATEGORIES= lang python
|
2003-07-31 21:42:23 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_PYTHON}
|
|
|
|
MASTER_SITE_SUBDIR= ftp/python/doc/${PORTVERSION}
|
2000-04-12 08:21:15 +02:00
|
|
|
DISTNAME= ${DOCFORMAT}-${PORTVERSION}
|
1999-06-02 12:13:25 +02:00
|
|
|
|
2003-06-09 07:42:04 +02:00
|
|
|
MAINTAINER= perky@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= Documentation for the Python programming language
|
1999-06-02 12:13:25 +02:00
|
|
|
|
|
|
|
DIST_SUBDIR= python
|
2001-03-15 13:29:01 +01:00
|
|
|
USE_PYTHON= yes
|
2000-10-20 10:36:33 +02:00
|
|
|
USE_BZIP2= yes
|
1999-06-02 12:13:25 +02:00
|
|
|
NO_BUILD= yes
|
2001-05-16 13:41:37 +02:00
|
|
|
PLIST= ${WRKDIR}/pkg-plist_${DOCFORMAT}
|
1999-06-02 12:13:25 +02:00
|
|
|
|
2003-07-31 21:42:23 +02:00
|
|
|
WRKSRC= ${WRKDIR}/Python-Docs-${PORTVERSION}
|
2001-05-02 14:01:35 +02:00
|
|
|
DOCDIR= ${PREFIX}/share/doc/${PYTHON_VERSION}
|
2001-05-16 13:41:37 +02:00
|
|
|
PLIST_DIFF= ${FILESDIR}/plist-${DOCFORMAT}-${PORTVERSION}.diff
|
1999-06-02 12:13:25 +02:00
|
|
|
|
|
|
|
DOCFORMAT?= html
|
|
|
|
|
|
|
|
.if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "pdf-a4" && ${DOCFORMAT} != "pdf-letter" && ${DOCFORMAT} != "postscript-a4" && ${DOCFORMAT} != "postscript-letter"
|
|
|
|
.BEGIN:
|
|
|
|
@${ECHO} "ERROR: invalid value for DOCFORMAT: \"${DOCFORMAT}\""
|
|
|
|
@${ECHO} "Possible values are: html, pdf-a4, pdf-letter,"
|
|
|
|
@${ECHO} "postscript-a4, postscript-letter."
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
|
|
|
|
2003-06-04 10:38:41 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${PYTHON_REL} < 220
|
|
|
|
PLIST_SUB+= PYTHON22_ONLY="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PYTHON22_ONLY=""
|
|
|
|
.endif
|
|
|
|
|
2003-07-31 21:42:23 +02:00
|
|
|
.if ${PYTHON_REL} < 230
|
1999-06-02 12:13:25 +02:00
|
|
|
do-extract:
|
|
|
|
@${RM} -rf ${WRKDIR}
|
|
|
|
@${MKDIR} ${WRKDIR}
|
2003-07-31 21:42:23 +02:00
|
|
|
.endif
|
1999-06-02 12:13:25 +02:00
|
|
|
|
2001-05-16 13:41:37 +02:00
|
|
|
pre-install:
|
2003-07-31 21:42:23 +02:00
|
|
|
.if ${PYTHON_REL} < 230
|
2001-05-16 13:41:37 +02:00
|
|
|
@${CP} ${PKGDIR}/pkg-plist_${DOCFORMAT} ${WRKDIR}
|
|
|
|
@if [ -f ${PLIST_DIFF} ]; then \
|
|
|
|
cd ${WRKDIR} && patch -p --quiet < ${PLIST_DIFF}; \
|
|
|
|
fi
|
2003-07-31 21:42:23 +02:00
|
|
|
.else
|
|
|
|
@cd ${WRKSRC} && (${FIND} . -type f | \
|
2004-01-22 12:06:02 +01:00
|
|
|
${SED} -e 's,^\.,share/doc/${PYTHON_VERSION},' | ${SORT} \
|
|
|
|
> ${PLIST})
|
2003-07-31 21:42:23 +02:00
|
|
|
@cd ${WRKSRC} && (${FIND} * -type d | \
|
|
|
|
${SED} -e 's,^,@dirrm share/doc/${PYTHON_VERSION}/,' | \
|
2004-01-22 12:06:02 +01:00
|
|
|
${SORT} -r) >> ${PLIST}
|
2003-07-31 21:42:23 +02:00
|
|
|
@${ECHO_CMD} "@unexec rmdir %D/share/doc/%%PYTHON_VERSION%% 2>/dev/null || true" >> ${PLIST}
|
|
|
|
.endif
|
2001-05-16 13:41:37 +02:00
|
|
|
|
1999-06-02 12:13:25 +02:00
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${DOCDIR}
|
2003-07-31 21:42:23 +02:00
|
|
|
.if ${PYTHON_REL} < 230
|
1999-06-02 12:13:25 +02:00
|
|
|
@(cd ${DOCDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${DISTFILES} ${EXTRACT_AFTER_ARGS})
|
2003-07-31 21:42:23 +02:00
|
|
|
.else
|
|
|
|
@${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${DOCDIR} -xf -
|
1999-06-02 12:13:25 +02:00
|
|
|
.endif
|
|
|
|
|
2003-06-04 10:38:41 +02:00
|
|
|
.include <bsd.port.post.mk>
|