# $Id: Portfile,v 1.8 2005/08/11 21:33:14 rshaw Exp $
PortSystem 1.0

name			cyberduck
version			2.3.3
revision		1
categories		aqua
maintainers		darwinports@opendarwin.org
platforms		darwin
description		Cyberduck is an open source SFTP and FTP browser
long_description	Cyberduck is an open source SFTP (SSH Secure File \
			Transfer) and FTP browser licenced under the GPL. It \
			has been built from the ground up with usability in \
			mind, having the same consistent graphical user \
			interface for both SFTP and FTP browsing. Multiple \
			connections are supported. Drag and drop is \
			supported consequently for transferring files \
			between server and client. A transfer queue keeps \
			track of the pending file transfers. A simple \
			bookmark manager ensures manageability. Core system \
			technologies such as the Keychain and Rendezvous are \
			supported. Cyberduck has been translated into \
			numerous languages including Japanese, Chinese, \
			Korean, French, German, Italian, Portuguese, Spanish \
			and Dutch.
homepage		http://cyberduck.ch
master_sites		${homepage}
distname		${name}-src-${version}
checksums		md5 5f04163c5058da50942baf771212b2ca

# This is actually a patch-time dependency, but that's not possible yet.
depends_lib		bin:ant:apache-ant

worksrcdir		${version}/${name}-cocoa
set appName		Cyberduck

patch {
	reinplace "s|/usr/local/bin/ant|[binaryInPath ant]|" \
		${worksrcpath}/${appName}.pbproj/project.pbxproj
}

use_configure	no

pre-build {
	if {![file exist /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h] || \
		![file exist /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Headers/jni.h]} {
		ui_error "Unfortunately, this port requires the Apple Java 1.4.2\n\
			Developer package in order to build. You can download it from\n\
			http://connect.apple.com/. A bug has been filed with Apple by\n\
			the author to have the proper headers included with the standard\n\
			client Java install so that the developer package is not\n\
			required. However, until then, it will be needed in order to\n\
			build this application from source."
		exit 1
	}
}

build.type		pbx
build.target
build.args		-buildstyle Deployment -target all

destroot {
	set appPath ${destroot}/Applications/DarwinPorts
	xinstall -d -m 0755 ${appPath}
	cd ${worksrcpath}/build
	system "cp -R ${appName}.app ${appPath}/${appName}.app"
}

