--- trunk.orig/debian/patches/lastbind-makefile	1969-12-31 16:00:00.000000000 -0800
+++ trunk/debian/patches/lastbind-makefile	2013-02-20 09:33:59.081227363 -0800
@@ -0,0 +1,35 @@
+Index: trunk/contrib/slapd-modules/lastbind/Makefile
+===================================================================
+--- trunk.orig/contrib/slapd-modules/lastbind/Makefile
++++ trunk/contrib/slapd-modules/lastbind/Makefile
+@@ -10,12 +10,12 @@
+ # top-level directory of the distribution or, alternatively, at
+ # <http://www.OpenLDAP.org/license.html>.
+ 
+-CPPFLAGS+=-I../../../include -I../../../servers/slapd 
++CPPFLAGS+=-I ../../../debian/build/include -I../../../include -I../../../servers/slapd 
+ CPPFLAGS+=-DSLAPD_OVER_LASTBIND=SLAPD_MOD_DYNAMIC
+ #LIBTOOL=libtool
+-LIBTOOL=../../../libtool
++LIBTOOL=../../../debian/build/libtool
+ 
+-prefix=/usr/local
++prefix=/usr
+ 
+ all: lastbind.la
+ 
+@@ -24,11 +24,11 @@
+ 
+ lastbind.la:    lastbind.lo
+ 	$(LIBTOOL) --mode=link $(CC) -version-info 0:0:0 \
+-		   -rpath $(prefix)/lib -module -o $@ $?
++		   -rpath $(prefix)/lib/ldap -module -o $@ $?
+ 
+ clean:
+ 	rm -rf lastbind.lo lastbind.la lastbind.o .libs/
+ 
+ install: lastbind.la
+-	mkdir -p $(prefix)/libexec/openldap
+-	$(LIBTOOL) --mode=install cp lastbind.la $(prefix)/libexec/openldap
++	mkdir -p $(DESTDIR)$(prefix)/lib/ldap
++	$(LIBTOOL) --mode=install cp lastbind.la $(DESTDIR)$(prefix)/lib/ldap
