# $Id: Portfile 76604 2011-03-02 01:49:46Z dports@macports.org $

PortSystem 1.0
PortGroup perl5 1.0

name            	shelldap
version         	0.4
revision        1

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     fba036df2ac7c56a9f81658ca823e926 \
                    sha1    8d6e1f69eb2bfddc0ecfbe07448c23880dbec7d3 \
                    rmd160  fc753e83980e6e930134962dc99df7b7ccff7579

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
}
