# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem 1.0
PortGroup perl5 1.0

name            	shelldap
version         	0.2

categories      	net sysutils
maintainers     	FaerieMUD.org:ged
description     	a handy shell-like interface for browsing and editing LDAP entries
long_description	Shelldap is a handy shell-like interface for browsing \
	LDAP servers and editing their content. Among its features: history, sane \
	autocompletes, credential caching, site-wide and individual config, \
	it's in perl, it's fun to say!  shelldap! shelldap! shelldap!

platforms       	darwin
master_sites    	http://www.martini.nu/misc/
homepage                http://projects.martini.nu/shelldap/
checksums       	md5 2c68afa69968b71888e029485ee32881 \
                	sha1 e32c9e6c32b5e027a43aed5347354bf7509b4052 \
			rmd160 1ff8907af359fe170d775b0fce373fe5430b63b6

depends_lib-append 	port:p5-perl-ldap \
			port:p5-term-shell \
			port:p5-yaml-syck \
			port:p5-algorithm-diff \
			port:p5-digest-hmac \
			port:p5-term-readline-gnu \
			port:p5-term-readkey

patch {
	reinplace "s|#!.*perl|#!${perl5.bin}|" ${worksrcpath}/shelldap
}

use_configure		no

build {
	system "pod2man ${worksrcpath}/shelldap ${worksrcpath}/shelldap.1"
}

destroot {
	xinstall -m 755 ${worksrcpath}/shelldap ${destroot}${prefix}/bin/
	xinstall -m 0755 -d ${destroot}${prefix}/share/man/man1
	xinstall -m 0644 ${worksrcpath}/shelldap.1 ${destroot}${prefix}/share/man/man1
}
