blob: 6926eb097c17f76e42009fed6ce0b8c0fd6238a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# New ports collection makefile for: py-diveintopython
# Date created: 15 March 2001
# Whom: Johann Visagie <johann@egenetics.com>
#
# $FreeBSD$
#
PORTNAME= diveintopython
PORTVERSION= 5.4
#PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://diveintopython.org/download/
DISTNAME= ${PORTNAME}
DISTFILES= ${DISTNAME}-html-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-html-flat-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-pdf-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-text-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-word-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-xml-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-common-${VERSIONSTR}${EXTRACT_SUFX} \
${DISTNAME}-examples-${VERSIONSTR}${EXTRACT_SUFX}
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}-html-${VERSIONSTR}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= A free Python tutorial book that is "not For Dummies(tm)"
NO_BUILD= YES
USE_REINPLACE= YES
USE_ZIP= YES
WRKSRC= ${WRKDIR}/${PORTNAME}-${VERSIONSTR}/html
DIPDLDIR= ${DOCSDIR}/download
CPIO= cpio --quiet -pdum -R
VERSIONSTR= ${PORTVERSION:C|(\.[^.]*)\.([^.]*)$|\1-\2|}
PLIST_SUB+= VERSION=${VERSIONSTR}
post-patch:
@ ${FIND} ${WRKSRC} -name \*.html | xargs ${REINPLACE_CMD} \
"s#http[^>]*\(download/${PORTNAME}-examples-${VERSIONSTR}.zip\)#\.\./\1#"
do-install:
@ ${MKDIR} ${DIPDLDIR}
@ cd ${WRKSRC} && \
${FIND} . -name \*.html -o -name \*.css -o -name \*.png \
| ${CPIO} ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
@ cd ${WRKSRC}/../py && ${FIND} * \
| ${CPIO} ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.for format in html html-flat pdf text word xml common examples
@ ${INSTALL_DATA} \
${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-${format}-${VERSIONSTR}.zip \
${DIPDLDIR}
.endfor
post-install:
@ ${CHMOD} -R ${SHAREMODE} ${DOCSDIR} ${EXAMPLESDIR}
@ ${CHMOD} -R ugo+X ${DOCSDIR} ${EXAMPLESDIR}
.include <bsd.port.mk>
|