aboutsummaryrefslogtreecommitdiff
path: root/lang/diveintopython/Makefile
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2001-04-27 17:38:02 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2001-04-27 17:38:02 +0000
commit03cf8c13fb013b2ec0ab5c6ae8ea7c3ef6adf3e5 (patch)
treeee7bed4de6fcce142ef4dd4b459fb62076e7ce92 /lang/diveintopython/Makefile
parent45fd61e26b3d184837388aac68651e8209a7cc0f (diff)
downloadports-03cf8c13fb013b2ec0ab5c6ae8ea7c3ef6adf3e5.tar.gz
ports-03cf8c13fb013b2ec0ab5c6ae8ea7c3ef6adf3e5.zip
add diveintopython
A free Python tutorial book that is "not For Dummies(tm)" PR: 26697 Submitted by: Johann Visagie <johann@egenetics.com>
Notes
Notes: svn path=/head/; revision=41970
Diffstat (limited to 'lang/diveintopython/Makefile')
-rw-r--r--lang/diveintopython/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/lang/diveintopython/Makefile b/lang/diveintopython/Makefile
new file mode 100644
index 000000000000..d9e719b9c5e6
--- /dev/null
+++ b/lang/diveintopython/Makefile
@@ -0,0 +1,57 @@
+# New ports collection makefile for: py-diveintopython
+# Date created: 15 March 2001
+# Whom: Johann Visagie <johann@egenetics.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= diveintopython
+PORTVERSION= 3.1.1
+CATEGORIES= lang python
+MASTER_SITES= http://diveintopython.org/download/
+DISTNAME= ${PORTNAME}
+DISTFILES= ${DISTNAME}-html-${VERSIONSTR}.tgz \
+ ${DISTNAME}-html-flat-${VERSIONSTR}.tgz \
+ ${DISTNAME}-pdf-${VERSIONSTR}.tgz \
+ ${DISTNAME}-text-${VERSIONSTR}.tgz \
+ ${DISTNAME}-xml-${VERSIONSTR}.tgz
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${DISTNAME}-html-${VERSIONSTR}.tgz \
+ ${DISTNAME}-html-flat-${VERSIONSTR}.tgz \
+ ${DISTNAME}-pdf-${VERSIONSTR}.tgz \
+ ${DISTNAME}-text-${VERSIONSTR}.tgz
+
+MAINTAINER= johann@egenetics.com
+
+NO_BUILD= YES
+DIPDIR= ${PREFIX}/share/doc/diveintopython
+DIPDLDIR= ${DIPDIR}/download
+CPIO= cpio --quiet -pdum -R
+# Is there a way of doing this without using a temporary variable?
+VERSIONTMP= ${PORTVERSION:S|.|-|g}
+VERSIONSTR= ${VERSIONTMP:S|-|.|}
+
+post-patch:
+ @ ${PERL} -pi.orig -e \
+ 's#<td><a[^>]*>(Windows|Mac ?OS)</a></td>##g; \
+ s#UNIX</a>#compressed</a>#g;s#for UNIX \(#(#g; \
+ s#<tr>(.(?!<tr>))*(Microsoft Word|Windows Help)(.(?!</tr>))*.</tr>##g; \
+ s#<td>(.(?!<td>))*cn/(.(?!</td>))*.</td>##g' \
+ ${WRKSRC}/index.html
+
+do-install:
+ @ ${MKDIR} ${DIPDLDIR}
+ @ cd ${WRKSRC} && find *.html *.css images \
+ | ${CPIO} ${SHAREOWN}:${SHAREGRP} ${DIPDIR}
+.for format in html pdf txt
+ @ ${INSTALL_DATA} ${WRKSRC}/${format}/${PORTNAME}.${format} \
+ ${DIPDLDIR}
+.endfor
+.for format in html html-flat pdf text xml
+ @ ${INSTALL_DATA} \
+ ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-${format}-${VERSIONSTR}.tgz \
+ ${DIPDLDIR}
+.endfor
+ @ cd ${WRKDIR} && ${TAR} czf ${DIPDLDIR}/examples.tgz py/*
+
+.include <bsd.port.mk>