# $Id: Portfile 116134 2014-01-19 05:11:39Z jmr@macports.org $

PortSystem 1.0

name            	shelldap
version         	0.5
revision            1

categories      	net sysutils
license         	BSD
maintainers     	nomaintainer
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
supported_archs 	noarch
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.16-perl-ldap \
			port:p5.16-term-shell \
			port:p5.16-yaml-syck \
			port:p5.16-algorithm-diff \
			port:p5.16-digest-hmac \
			port:p5.16-term-readline-gnu \
			port:p5.16-term-readkey

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

use_configure		no

build {
	system "pod2man-5.16 ${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
}
