# $Id: Portfile,v 1.8 2006/04/01 21:10:44 blb Exp $
PortSystem		1.0

name			ZopeEditManager
version			0.9.5
categories		aqua zope www python
maintainers		darwinports@opendarwin.org
description		Zope Edit Manager for External Editing support on Mac OS X
long_description	${description}
homepage		http://www.urbanape.com/software
master_sites	http://www.urbanape.com/downloads/
distfiles		${name}-${version}-src${extract.suffix}
checksums		md5 86e931428abbf71fb02efe0b2f50c150
platforms		darwin

# Use Python 2.3 from DarwinPorts explicitly 
set python		${prefix}/bin/python2.3
set pythonlib	${prefix}/lib/python2.3

# Depends on Python, Py-Objc, and Py2App for building ONLY
depends_build	path:${python}:python23 \
				path:${pythonlib}/site-packages/PyObjC:py-pyobjc \
				path:${pythonlib}/site-packages/py2app:py-py2app

patchfiles		patch-Readme.html \
				patch-setup.py

use_configure	no

build.cmd		${python} setup.py py2app
build.target	

destroot {
	set appPath ${destroot}/Applications/DarwinPorts
	cd ${worksrcpath}
	xinstall -d -m 0755 ${appPath}
	system "cp -R dist/${name}.app ${appPath}/${name}.app"
	set helpPath ${appPath}/${name}.app/Contents/Resources/English.lproj/${name}Help
	xinstall -d -m 0755 ${helpPath}
	xinstall -m 0644 Readme.txt ${helpPath}/Readme.txt
	xinstall -m 0644 Readme.html ${helpPath}/Readme.html
	xinstall -d -m 0755 ${helpPath}/images
	foreach img [glob images/*] {
		xinstall -m 0644 $img ${helpPath}/$img
	}
}

