# $Id: Portfile 77792 2011-04-13 06:26:08Z jmr@macports.org $

PortSystem 1.0
PortGroup python24 1.0

name			py-svn
version			1.7.5
categories		python devel
maintainers		gmail.com:yunzheng.hu
platforms		darwin
description		Python Subversion Extension (pysvn)
long_description	The pysvn module is a python interface to the \
			Subversion version control system. This API exposes \
			client interfaces for managing a working copy, \
			querying a repository, and synchronizing the two.

homepage		http://pysvn.tigris.org/

master_sites		http://pysvn.barrys-emacs.org/source_kits/
distname		pysvn-${version}
checksums		md5 3334718248ec667b17d333aac73d5680 \
			sha1 912d7081a8294a578f822e03d60747154cf8532d \
			rmd160 d412aab74737d371a184a327ceadc971a00340ab

depends_lib		port:python24 \
			port:subversion

patchfiles              patch-setup_configure.py

configure {
    system "cd ${worksrcpath}/Source && ${python.bin} setup.py backport && ${python.bin} setup.py configure"
}

build.cmd		make
build.dir       ${worksrcpath}/Source
build.target		all

destroot {
	file mkdir ${destroot}${python.pkgd}
	file copy ${worksrcpath}/Source/pysvn ${destroot}${python.pkgd}

	file mkdir ${destroot}${prefix}/share/doc/${name}/examples
	eval file copy [glob ${worksrcpath}/Examples/*] \
		${destroot}${prefix}/share/doc/${name}/examples
	eval file copy [glob ${worksrcpath}/Docs/*] \
		${destroot}${prefix}/share/doc/${name}
}
