# $Id: Portfile 83594 2011-09-06 23:56:14Z ged@macports.org $

PortSystem 1.0
PortGroup perl5 1.0

name            	shelldap
version         	0.5
revision            0

categories      	net sysutils
maintainers     	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     6400c5bba80fb154d06c57385c6e748f \
                    sha1    f06fabca2e3b7c41360cd9c2bbddbc45f8836ca4 \
                    rmd160  2aae3bfc0f8d00dec4cdd9ad9634606b49a185c2

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

patch {
	reinplace "s|#!.*perl|#!${prefix}/bin/perl5.12|" ${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
}
