PortSystem		1.0
PortGroup		xcode 1.0

name			fugu
set my_name		Fugu
version			1.2.0
license			MIT
maintainers		nomaintainer
description		A Mac OS X SFTP, SCP and SSH Frontend.

long_description	Fugu is a graphical frontend to the commandline \
			Secure File Transfer application (SFTP). SFTP is \
			similar to FTP, but unlike FTP, the entire session \
			is encrypted, meaning no passwords are sent in \
			cleartext form, and is thus much less vulnerable to \
			third-party interception.

homepage		http://rsug.itd.umich.edu/software/fugu/
master_sites	${homepage}files/
extract.suffix	.tgz

checksums		md5 977b15709364f2fc26d0152a7667d379 \
				sha1 f52458be93a57b8f7b1438a9bf790d7b8be71247 \
				rmd160 6b7503b071abea4f764da9cbfc62b6d6e29ab0c2

supported_archs	i386 ppc

xcode.destroot.settings SKIP_INSTALL=yes

if {${os.major} >= 11} {
    patchfiles-append no-TruncateThemeText.patch
}

post-patch {
    if {[vercmp $xcodeversion 4.0] >= 0} {
        move ${worksrcpath}/Fugu.pbproj ${worksrcpath}/Fugu.xcodeproj
        file copy -force ${filespath}/project.pbxproj ${worksrcpath}/Fugu.xcodeproj/
        reinplace "s|build/|build/${xcode.configuration}/|" \
            ${worksrcpath}/Fugu.xcodeproj/project.pbxproj
    } else {
        reinplace "s|build/|build/${xcode.configuration}/|" \
            ${worksrcpath}/Fugu.pbproj/project.pbxproj
	}
}

post-destroot {
	delete ${worksrcpath}/build/${xcode.configuration}/${my_name}.app/${my_name}.app
	xinstall -d ${destroot}${applications_dir}
	copy ${worksrcpath}/build/${xcode.configuration}/${my_name}.app \
		${destroot}${applications_dir}
}

livecheck.type	regex
livecheck.url	${homepage}
livecheck.regex "${my_name} (\\d+(?:\\.\\d+)*)"
