mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-23 09:10:43 +00:00
2cc7961055
- Fix file modes after installation - Bump PORTREVISION PR: 33461 Submitted by: Alan Eldridge <ports@geeksrus.net>
59 lines
1.7 KiB
Makefile
59 lines
1.7 KiB
Makefile
# New ports collection makefile for: py-diveintopython
|
|
# Date created: 15 March 2001
|
|
# Whom: Johann Visagie <johann@egenetics.com>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= diveintopython
|
|
PORTVERSION= 3.9.1
|
|
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}-examples-${VERSIONSTR}${EXTRACT_SUFX}
|
|
DIST_SUBDIR= ${PORTNAME}
|
|
EXTRACT_ONLY= ${DISTNAME}-html-${VERSIONSTR}${EXTRACT_SUFX}
|
|
|
|
MAINTAINER= wjv@FreeBSD.org
|
|
|
|
NO_BUILD= YES
|
|
USE_ZIP= YES
|
|
WRKSRC= ${WRKDIR}/html
|
|
DIPDLDIR= ${DOCSDIR}/download
|
|
CPIO= cpio --quiet -pdum -R
|
|
VERSIONSTR= ${PORTVERSION:C|\.([^.]*)$|-\1|}
|
|
PLIST_SUB+= VERSION=${VERSIONSTR}
|
|
|
|
post-patch:
|
|
@ ${PERL} -pi.orig -e \
|
|
's#<div class="selfad"(.(?!</div>))*.</div>##; \
|
|
s#<tr[^>]*>(.(?!<tr[^>]*>))*(Microsoft|Windows)(.(?!</tr>))*.</tr>##g; \
|
|
s#<td>(.(?!<td>))*/(cn/|(es|fr)/[^"]|kr/)(.(?!</td>))*.</td>##g' \
|
|
${WRKSRC}/index.html
|
|
@ ${PERL} -pi -e \
|
|
's#http[^>]*(download/${PORTNAME}-examples-${VERSIONSTR}.zip)#$$1#' \
|
|
${WRKSRC}/*.html
|
|
|
|
do-install:
|
|
@ ${MKDIR} ${DIPDLDIR}
|
|
@ cd ${WRKSRC} && find *.html *.css images \
|
|
| ${CPIO} ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
|
|
@ cd ${WRKDIR}/py && find * \
|
|
| ${CPIO} ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
|
|
.for format in html html-flat pdf text 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>
|