# $Id: Portfile 46207 2009-01-31 19:59:43Z jmr@macports.org $

PortSystem 1.0

categories              lang
depends_build           port:py26-sphinx
depends_lib             port:python30
use_configure   	no

name			python30-doc
version			3.0
platforms		darwin
maintainers		mww
description		Python 3.0 Docs
long_description	${description}

homepage		http://docs.python.org/
master_sites		http://www.python.org/ftp/python/3.0/
distname		Python-${version}
dist_subdir		python30
use_bzip2       yes
checksums		md5 28021e4c542323b7544aace274a03bed \
                sha1 bf434861cd7bdefb47703ffb6bbc66c6dbd2da3d

patchfiles      Makefile.diff

worksrcdir		${worksrcdir}/Doc
build.target		html
build.args-append   PYTHON=${prefix}/bin/python2.6
extract.post_args	"| tar -xf - ${distname}/Doc"

set mydest ${frameworks_dir}/Python.framework/Versions/3.0/Resources/English.lproj/Documentation

destroot {
	file mkdir ${destroot}${mydest}
	file copy ${worksrcpath}/build/html ${destroot}${mydest}
	file mkdir ${destroot}${prefix}/share/doc/$name
	system "cd ${destroot}${prefix}/share/doc/$name && \
		ln -sf ${mydest}/html"
	move ${destroot}${mydest}/html/library ${destroot}${mydest}/html/lib
	move ${destroot}${mydest}/html/reference ${destroot}${mydest}/html/ref
}

post-activate {
ui_msg "\n\n\nYou will find the docs in:\n"
ui_msg "${mydest}\n\n\n"
}

livecheck.check	regex
livecheck.url	http://www.python.org/download/releases/3.0/
livecheck.regex	/3.0/Python-(\[0-9a-z.\]+)\\.tgz
