# $Id: Portfile,v 1.2 2005/04/21 15:58:21 jberry Exp $
PortSystem	1.0

name			tinyca
version			0.6.7
categories		security net
maintainers		landonf@opendarwin.org
description		GUI Certificate Authority tool.
long_description	TinyCA is a simple graphical user interface for \
			managing a small CA (Certification Authority). \
			TinyCA works as a frontend for openssl
platforms		darwin
homepage		http://tinyca.sm-zone.net/
master_sites		${homepage}
checksums		md5 4fdf13c00ea8d83b0ecf4e8256292a4d
depends_lib		bin:XXX:openssl bin:XXX:zip \
			lib:libintl.3:gettext port:p5-gtk-perl \
			port:p5-gnome port:p5-locale-gettext

patchfiles		patch-tinyca

configure {}

build.dir		${worksrcpath}/po
build.target		""

post-patch {
	reinplace s|@SHARE@|${prefix}/share|g ${worksrcpath}/tinyca
	reinplace s|@OPENSSL@|${prefix}/bin/openssl|g ${worksrcpath}/tinyca
	reinplace s|@ZIP@|${prefix}/bin/zip|g ${worksrcpath}/tinyca
	reinplace s|/usr/bin/perl|${prefix}/bin/perl|g ${worksrcpath}/tinyca
}

destroot {
	set sharedir ${destroot}${prefix}/share/tinyca
	file mkdir ${sharedir}
	file copy -force ${worksrcpath}/tinyca ${destroot}${prefix}/bin/
	file copy -force ${worksrcpath}/lib ${sharedir}
	file copy -force ${worksrcpath}/templates ${sharedir}
	file copy -force ${worksrcpath}/locale/ ${destroot}${prefix}/share/locale
	foreach file [exec find ${destroot}${prefix} -name CVS -type d] {
		file delete -force ${file}
	}
}
