# $Id: Portfile,v 1.9 2006/01/27 11:32:03 olegb Exp $
PortSystem  1.0
name		    lbdb 
version		  0.30
revision	1
categories	mail
description	The little brother's database for the mutt mail reader.
long_description	This package consists of a set of small tools, \
			which collect mail addresses from several sources \
			and offer these addresses to the mutt external \
			query feature. \
			It can use Emacs bbdb, abook, ldap and evec mac os \
			x addressbook for query.
homepage	    http://www.spinnaker.de/lbdb/
platforms	    darwin freebsd
maintainers	  reilles@loria.fr
master_sites	http://www.spinnaker.de/debian/ 
checksums	sha1 d137c11857ea23e9689e0f93d876ec107a7b8467
distname      ${name}_${version}
worksrcdir    ${name}-${version}

platform darwin 8 {
  if { $xcodeversion == "2.1" } {
     patchfiles Makefile.in.patch
  }
}

configure.dir ${workpath}/${name}-${version}
configure.args	--sysconfdir=${prefix}/etc/ --libdir=${prefix}/lib/lbdb/ \
				--mandir=${prefix}/share/man	 
build.dir        ${configure.dir}
destroot.target  install 
destroot.destdir install_prefix=${destroot}

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/emacs/site-lisp
	file copy ${configure.dir}/lbdb.el ${destroot}${prefix}/share/emacs/site-lisp
}

variant gpg { configure.args-append --with-gpg 
				depends_lib port:gnupg }
variant ldap { depends_lib port:p5-perl-ldap }
