[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#6883) Improved Makefiles for contrib modules
--Boundary-00=_XqOPP0RBjyQeXED
Content-Type: Text/Plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
On Tuesday, 29 March 2011 17:25:10 you wrote:
> Full_Name: Buchan Milne
> Version: 2.4.25
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (196.25.124.16)
>
>
> While the code in contrib is not supported, some overlays provide make
> files, some don't, and there were variations in a lot of the make files
> (e.g. use of DESTDIR or not).
>
> In order to add make files for overlays that don't have them, improve the
> consistency of the make files between overlays that had them, and to
> provide some basic sanity testing in a 'test' target, I have created the
> patch at:
> http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/openldap/curren
> t/SOURCES/openldap-2.4.25-contrib-makefiles-with-tests.patch?revision=64874
> 4&view=markup
>
> The patch is against 2.4.25, but should apply to master (except that there
> two additional overlays are present in master). Where feasible I have
> retained the majority of an existing make file, in other cases, where
> modifications would exceed the original content, I have replaced existing
> make files wholesale.
>
> The attached patch file is derived from OpenLDAP Software. All of the
> modifications to OpenLDAP Software represented in the following patch(es)
> were developed by Buchan Milne (bgmilne@staff.telkomsa.net). I have not
> assigned rights and/or interest in this work to any party.
Attached is an updated patch against current master (since
ftp.openldap.org/incoming is out of disk space).
Please let me know how we can get this patch merged.
Regards,
Buchan
--Boundary-00=_XqOPP0RBjyQeXED
Content-Type: text/x-patch;
charset="UTF-8";
name="0001-Fix-contrib-Makefiles-to-use-libtool-and-be-consiste.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="0001-Fix-contrib-Makefiles-to-use-libtool-and-be-consiste.patch"
=46rom 168ed0544cfd529c8bdff1e5366c1bc60477b1cb Mon Sep 17 00:00:00 2001
=46rom: Buchan Milne <bgmilne@staff.telkomsa.net>
Date: Fri, 3 Jun 2011 10:18:39 +0200
Subject: [PATCH] Fix contrib Makefiles to use libtool and be consistent
(ITS#6883)
This makes existing Makefiles provided with contrib modules more
consistent, using libtool for compiling and linking. A trivial
test target has also been added, which tests that the module can
be loaded. Existing Makefiles were consulted, but were mainly copied
from the first working/tested Makefile. As such, any pre-existing
copyright notices have been replaced.
Makefiles are also provided for all the contrib modules that did not
have Makefiles.
=2D--
contrib/slapd-modules/acl/Makefile | 48 +++++++++++++++
contrib/slapd-modules/addpartial/Makefile | 50 ++++++++++++++---
contrib/slapd-modules/allop/Makefile | 47 +++++++++++++++
contrib/slapd-modules/allowed/Makefile | 58 ++++++++++---------
contrib/slapd-modules/autogroup/Makefile | 36 +++++++++---
contrib/slapd-modules/cloak/Makefile | 43 ++++++++++++--
contrib/slapd-modules/denyop/Makefile | 48 +++++++++++++++
contrib/slapd-modules/dsaschema/Makefile | 47 +++++++++++++++
contrib/slapd-modules/dupent/Makefile | 58 +++++++++----------
contrib/slapd-modules/kinit/Makefile | 47 +++++++++++++++
contrib/slapd-modules/lastbind/Makefile | 32 +++++++---
contrib/slapd-modules/lastmod/Makefile | 48 +++++++++++++++
contrib/slapd-modules/noopsrch/Makefile | 58 +++++++++----------
contrib/slapd-modules/nops/Makefile | 47 ++++++++++++----
contrib/slapd-modules/nssov/Makefile | 13 ++++-
contrib/slapd-modules/passwd/Makefile | 86 +++++++++++++++---------=
=2D---
contrib/slapd-modules/passwd/sha2/Makefile | 48 +++++++++++++---
contrib/slapd-modules/trace/Makefile | 48 +++++++++++++++
18 files changed, 680 insertions(+), 182 deletions(-)
create mode 100644 contrib/slapd-modules/acl/Makefile
create mode 100644 contrib/slapd-modules/allop/Makefile
create mode 100644 contrib/slapd-modules/denyop/Makefile
create mode 100644 contrib/slapd-modules/dsaschema/Makefile
create mode 100644 contrib/slapd-modules/kinit/Makefile
create mode 100644 contrib/slapd-modules/lastmod/Makefile
create mode 100644 contrib/slapd-modules/trace/Makefile
diff --git a/contrib/slapd-modules/acl/Makefile b/contrib/slapd-modules/acl=
/Makefile
new file mode 100644
index 0000000..9f48c0d
=2D-- /dev/null
+++ b/contrib/slapd-modules/acl/Makefile
@@ -0,0 +1,48 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_ACL=3DSLAPD_MOD_DYNAMIC
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: posixgroup.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: posixgroup.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: posixgroup.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/addpartial/Makefile b/contrib/slapd-modu=
les/addpartial/Makefile
index 3b68815..2f1fd31 100644
=2D-- a/contrib/slapd-modules/addpartial/Makefile
+++ b/contrib/slapd-modules/addpartial/Makefile
@@ -1,13 +1,47 @@
# $OpenLDAP$
=2DOPENLDAP_SRC=3D../../..
=2DOPENLDAP_BLD=3D../../..
=2DCPPFLAGS+=3D-I${OPENLDAP_SRC}/include -I${OPENLDAP_SRC}/servers/slapd -I=
${OPENLDAP_BLD}/include
=2DCC=3Dgcc
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
=20
=2Dall: addpartial-overlay.so
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
=20
=2Daddpartial-overlay.so: addpartial-overlay.c
=2D $(CC) -shared $(CPPFLAGS) $(LDFLAGS) -Wall -o $@ $?
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: addpartial.la
+
+%.lo: addpartial-overlay.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $< -o addpartial.lo
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm addpartial-overlay.so
+ rm -rf *.lo *.la *.o .libs/
+
+install: addpartial.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: addpartial.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/allop/Makefile b/contrib/slapd-modules/a=
llop/Makefile
new file mode 100644
index 0000000..a995e61
=2D-- /dev/null
+++ b/contrib/slapd-modules/allop/Makefile
@@ -0,0 +1,47 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: allop.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: allop.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: allop.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/allowed/Makefile b/contrib/slapd-modules=
/allowed/Makefile
index 8f5be91..75e63c1 100644
=2D-- a/contrib/slapd-modules/allowed/Makefile
+++ b/contrib/slapd-modules/allowed/Makefile
@@ -1,8 +1,6 @@
=2D# $OpenLDAP$
=2D# This work is part of OpenLDAP Software <http://www.openldap.org/>.
=2D#
=2D# Copyright 1998-2011 The OpenLDAP Foundation.
=2D# Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved.
+# $$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
@@ -12,35 +10,39 @@
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.
=20
=2DPREFIX=3D/opt/openldap-HEAD
=2D
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_ALLOWED=3DSLAPD_MOD_DYNAMIC
LIBTOOL=3D../../../libtool
=2DOPT=3D-g -O2
=2DCC=3Dgcc
=2D
=2DDEFS=3D-DSLAPD_OVER_ALLOWED=3DSLAPD_MOD_DYNAMIC
=2D
=2DLDAP_INC=3D-I../../../include -I../../../servers/slapd
=2DINCS=3D$(LDAP_INC)
=2D
=2DLDAP_LIB=3D-lldap_r -llber -L../../../lib
=2DLDAP_LIB=3D
=2DLIBS=3D$(LDAP_LIB)
=20
=2Dall: allowed.la
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
+all: allowed.la
=20
=2Dallowed.lo: allowed.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2Dallowed.la: allowed.lo
=2D $(LIBTOOL) --mode=3Dlink $(CC) $(OPT) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $? $(LIBS)
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f allowed.o allowed.lo allowed.la
+ rm -rf *.lo *.la *.o .libs/
=20
install: allowed.la
=2D mkdir -p $(PREFIX)/libexec/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp allowed.la $(PREFIX)/libexec/openldap
=2D $(LIBTOOL) --finish $(PREFIX)/libexec/openldap
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: allowed.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/autogroup/Makefile b/contrib/slapd-modul=
es/autogroup/Makefile
index 70146ac..4438cbf 100644
=2D-- a/contrib/slapd-modules/autogroup/Makefile
+++ b/contrib/slapd-modules/autogroup/Makefile
@@ -1,6 +1,17 @@
=2DLIBTOOL=3D../../../libtool
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
=20
=2DCPPFLAGS+=3D-I../../../include -I../../../servers/slapd
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
=20
ldap_subdir =3D openldap
prefix=3D/usr/local
@@ -8,20 +19,29 @@ exec_prefix =3D $(prefix)
libdir =3D $(exec_prefix)/lib
libexecdir =3D $(exec_prefix)/libexec
moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
all: autogroup.la
=20
=2Dautogroup.lo: autogroup.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $?
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2Dautogroup.la: autogroup.lo
+%.la: %.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(libdir) -module -o $@ $?=20
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f autogroup.lo autogroup.la
+ rm -rf *.lo *.la *.o .libs/
=20
install: autogroup.la
mkdir -p $(DESTDIR)$(moduledir)
=2D $(LIBTOOL) --mode=3Dinstall cp autogroup.la $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
$(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: autogroup.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/cloak/Makefile b/contrib/slapd-modules/c=
loak/Makefile
index 4562fcb..d92ff8b 100644
=2D-- a/contrib/slapd-modules/cloak/Makefile
+++ b/contrib/slapd-modules/cloak/Makefile
@@ -1,17 +1,48 @@
# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
CPPFLAGS+=3D-DSLAPD_OVER_CLOAK=3DSLAPD_MOD_DYNAMIC
=2DLIBS=3D-lldap_r -llber -lcrypto
LIBTOOL=3D../../../libtool
=20
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
all: cloak.la
=20
=2Dcloak.lo: cloak.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -c $?
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2Dcloak.la: cloak.lo
+%.la: %.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $? $(LIBS)
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm cloak.lo cloak.la
+ rm -rf *.lo *.la *.o .libs/
+
+install: cloak.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: cloak.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/denyop/Makefile b/contrib/slapd-modules/=
denyop/Makefile
new file mode 100644
index 0000000..711eee7
=2D-- /dev/null
+++ b/contrib/slapd-modules/denyop/Makefile
@@ -0,0 +1,48 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_DENYOP=3DSLAPD_MOD_DYNAMIC
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: denyop.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: denyop.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: denyop.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/dsaschema/Makefile b/contrib/slapd-modul=
es/dsaschema/Makefile
new file mode 100644
index 0000000..90f711e
=2D-- /dev/null
+++ b/contrib/slapd-modules/dsaschema/Makefile
@@ -0,0 +1,47 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: dsaschema.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: dsaschema.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: dsaschema.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/dupent/Makefile b/contrib/slapd-modules/=
dupent/Makefile
index 54a69ce..c1e8997 100644
=2D-- a/contrib/slapd-modules/dupent/Makefile
+++ b/contrib/slapd-modules/dupent/Makefile
@@ -1,8 +1,6 @@
# $OpenLDAP$
=2D# This work is part of OpenLDAP Software <http://www.openldap.org/>.
=2D#
=2D# Copyright 1998-2011 The OpenLDAP Foundation.
=2D# Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved.
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
@@ -12,41 +10,39 @@
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.
=20
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_DUPENT=3DSLAPD_MOD_DYNAMIC -g -O2
LIBTOOL=3D../../../libtool
=2DOPT=3D-DSLAPD_OVER_DUPENT=3D2 -g -O2
=2D#LIBTOOL=3D../../../../ldap-devel/libtool
=2D#OPT=3D-DSLAPD_OVER_DUPENT=3D2 -g -O0
=2DCC=3Dgcc
=2D
=2DLDAP_INC=3D-I../../../include -I../../../servers/slapd
=2D#LDAP_INC=3D-I../../../include -I../../../servers/slapd -I../../../../ld=
ap-devel/include
=2DINCS=3D$(LDAP_INC)
=2D
=2DLDAP_LIB=3D-lldap_r -llber
=2DLIBS=3D$(LDAP_LIB)
=20
+ldap_subdir =3D openldap
prefix=3D/usr/local
=2Dexec_prefix=3D$(prefix)
=2Dldap_subdir=3D/openldap
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
=2Dlibdir=3D$(exec_prefix)/lib
=2Dlibexecdir=3D$(exec_prefix)/libexec
=2Dmoduledir =3D $(libexecdir)$(ldap_subdir)
+all: dupent.la
=20
=2Dall: dupent.la
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2D
=2Ddupent.lo: dupent.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
=2D
=2Ddupent.la: dupent.lo
=2D $(LIBTOOL) --mode=3Dlink $(CC) $(OPT) -version-info 0:0:0 \
=2D -rpath $(moduledir) -module -o $@ $? $(LIBS)
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f dupent.lo dupent.la
+ rm -rf *.lo *.la *.o .libs/
=20
install: dupent.la
mkdir -p $(DESTDIR)$(moduledir)
=2D $(LIBTOOL) --mode=3Dinstall cp dupent.la $(DESTDIR)$(moduledir)
=2D
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: dupent.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/kinit/Makefile b/contrib/slapd-modules/k=
init/Makefile
new file mode 100644
index 0000000..750c7b9
=2D-- /dev/null
+++ b/contrib/slapd-modules/kinit/Makefile
@@ -0,0 +1,47 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: kinit.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $< -lkrb5
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: kinit.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: kinit.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/lastbind/Makefile b/contrib/slapd-module=
s/lastbind/Makefile
index ecc9ed1..643b0c1 100644
=2D-- a/contrib/slapd-modules/lastbind/Makefile
+++ b/contrib/slapd-modules/lastbind/Makefile
@@ -1,5 +1,5 @@
# $OpenLDAP$
=2D# Copyright 2009 Jonathan Clarke <jonathan@phillipoux.net>.
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -12,23 +12,37 @@
=20
CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
CPPFLAGS+=3D-DSLAPD_OVER_LASTBIND=3DSLAPD_MOD_DYNAMIC
=2D#LIBTOOL=3Dlibtool
LIBTOOL=3D../../../libtool
=20
+ldap_subdir =3D openldap
prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
all: lastbind.la
=20
=2Dlastbind.lo: lastbind.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $?
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2Dlastbind.la: lastbind.lo
+%.la: %.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(prefix)/lib -module -o $@ $?
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -rf lastbind.lo lastbind.la lastbind.o .libs/
+ rm -rf *.lo *.la *.o .libs/
=20
install: lastbind.la
=2D mkdir -p $(prefix)/libexec/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp lastbind.la $(prefix)/libexec/openldap
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: lastbind.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/lastmod/Makefile b/contrib/slapd-modules=
/lastmod/Makefile
new file mode 100644
index 0000000..e9f0408
=2D-- /dev/null
+++ b/contrib/slapd-modules/lastmod/Makefile
@@ -0,0 +1,48 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_LASTMOD=3DSLAPD_MOD_DYNAMIC
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: lastmod.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: lastmod.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: lastmod.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/noopsrch/Makefile b/contrib/slapd-module=
s/noopsrch/Makefile
index d90bc59..7227582 100644
=2D-- a/contrib/slapd-modules/noopsrch/Makefile
+++ b/contrib/slapd-modules/noopsrch/Makefile
@@ -1,8 +1,6 @@
# $OpenLDAP$
=2D# This work is part of OpenLDAP Software <http://www.openldap.org/>.
=2D#
=2D# Copyright 1998-2011 The OpenLDAP Foundation.
=2D# Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved.
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
@@ -12,41 +10,39 @@
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.
=20
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_NOOPSRCH=3DSLAPD_MOD_DYNAMIC -g -O2
LIBTOOL=3D../../../libtool
=2DOPT=3D-DSLAPD_OVER_NOOPSRCH=3D2 -g -O2
=2D#LIBTOOL=3D../../../../ldap-devel/libtool
=2D#OPT=3D-DSLAPD_OVER_NOOPSRCH=3D2 -g -O0
=2DCC=3Dgcc
=2D
=2DLDAP_INC=3D-I../../../include -I../../../servers/slapd
=2D#LDAP_INC=3D-I../../../include -I../../../servers/slapd -I../../../../ld=
ap-devel/include
=2DINCS=3D$(LDAP_INC)
=2D
=2DLDAP_LIB=3D-lldap_r -llber
=2DLIBS=3D$(LDAP_LIB)
=20
+ldap_subdir =3D openldap
prefix=3D/usr/local
=2Dexec_prefix=3D$(prefix)
=2Dldap_subdir=3D/openldap
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
=2Dlibdir=3D$(exec_prefix)/lib
=2Dlibexecdir=3D$(exec_prefix)/libexec
=2Dmoduledir =3D $(libexecdir)$(ldap_subdir)
+all: noopsrch.la
=20
=2Dall: noopsrch.la
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2D
=2Dnoopsrch.lo: noopsrch.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
=2D
=2Dnoopsrch.la: noopsrch.lo
=2D $(LIBTOOL) --mode=3Dlink $(CC) $(OPT) -version-info 0:0:0 \
=2D -rpath $(moduledir) -module -o $@ $? $(LIBS)
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f noopsrch.lo noopsrch.la
+ rm -rf *.lo *.la *.o .libs/
=20
install: noopsrch.la
mkdir -p $(DESTDIR)$(moduledir)
=2D $(LIBTOOL) --mode=3Dinstall cp noopsrch.la $(DESTDIR)$(moduledir)
=2D
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: noopsrch.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/nops/Makefile b/contrib/slapd-modules/no=
ps/Makefile
index fce44e0..6da5cd0 100644
=2D-- a/contrib/slapd-modules/nops/Makefile
+++ b/contrib/slapd-modules/nops/Makefile
@@ -1,23 +1,48 @@
# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
CPPFLAGS+=3D-DSLAPD_OVER_NOPS=3DSLAPD_MOD_DYNAMIC
=2DLIBS=3D-L$(PREFIX)/lib -lldap_r -llber -lcrypto
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
=20
all: nops.la
=20
=2Dnops.lo: nops.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -c $?
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
=20
=2Dnops.la: nops.lo
+%.la: %.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $? $(LIBS)
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f nops.lo nops.la
+ rm -rf *.lo *.la *.o .libs/
=20
install: nops.la
=2D mkdir -p $(PREFIX)/lib/openldap=20
=2D mkdir -p $(PREFIX)/man/man5
=2D $(LIBTOOL) --mode=3Dinstall cp nops.la $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --finish $(PREFIX)/lib
=2D cp nops.5 $(PREFIX)/man/man5
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: nops.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/nssov/Makefile b/contrib/slapd-modules/n=
ssov/Makefile
index 322fcdd..f1ec793 100644
=2D-- a/contrib/slapd-modules/nssov/Makefile
+++ b/contrib/slapd-modules/nssov/Makefile
@@ -28,7 +28,7 @@ NLDAPD_INC=3D-Inss-pam-ldapd
INCS=3D$(LDAP_INC) $(NLDAPD_INC)
=20
LDAP_LIB=3D-lldap_r -llber
=2DLIBS=3D$(LDAP_LIB)
+LIBS=3D-L../../../libraries/liblber -L../../../libraries/libldap_r $(LDAP_=
LIB)
=20
prefix=3D/usr/local
exec_prefix=3D$(prefix)
@@ -39,6 +39,7 @@ libexecdir=3D$(exec_prefix)/libexec
moduledir =3D $(libexecdir)$(ldap_subdir)
sysconfdir =3D $(prefix)/etc$(ldap_subdir)
schemadir =3D $(sysconfdir)/schema
+slapd=3D../../../servers/slapd/slapd
=20
all: nssov.la
=20
@@ -59,7 +60,7 @@ $(OBJS): nssov.h
=20
nssov.la: $(OBJS) $(XOBJS)
$(LIBTOOL) --mode=3Dlink $(CC) $(OPT) -version-info 0:0:0 \
=2D -rpath $(libdir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
+ -rpath $(moduledir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
=20
install: nssov.la
mkdir -p $(DESTDIR)$(moduledir)
@@ -69,3 +70,11 @@ install: nssov.la
clean:
rm -f *.*o *.la .libs/*
rm -rf .libs
+
+test: nssov.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/passwd/Makefile b/contrib/slapd-modules/=
passwd/Makefile
index 1e49e6a..748b4ce 100644
=2D-- a/contrib/slapd-modules/passwd/Makefile
+++ b/contrib/slapd-modules/passwd/Makefile
@@ -1,46 +1,52 @@
# $OpenLDAP$
=2DCPPFLAGS+=3D-I../../../include -I../../../servers/slapd
=2D
=2Dall: kerberos.la netscape.la radius.la apr1.la
=2D
=2Dkerberos.lo: kerberos.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -DHAVE_KRB5 -Wall -c $?
=2D
=2Dkerberos.la: kerberos.lo
=2D $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $? -lkrb5
=2D
=2Dnetscape.lo: netscape.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $?
=2D
=2Dnetscape.la: netscape.lo
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+LIBTOOL=3D../../../libtool
+SUBDIRS =3D sha2
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: kerberos.la netscape.la radius.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+kerberos.la: kerberos.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $?=20
=2D
=2Dradius.lo: radius.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $?
=2D
=2Dradius.la: radius.lo
=2D $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $? -lradius
=2D
=2Dapr1.lo: apr1.c
=2D $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $?
+ -rpath $(moduledir) -module -o $@ $< -lkrb5
=20
=2Dapr1.la: apr1.lo
+%.la: %.lo
$(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
=2D -rpath $(PREFIX)/lib -module -o $@ $?=20
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D rm -f kerberos.lo kerberos.la
=2D rm -f netscape.lo netscape.la
=2D rm -f radius.lo radius.la
=2D rm -f apr1.lo apr1.la
=2D
=2Dinstall: kerberos.la netscape.la radius.la apr1.la
=2D mkdir -p $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp kerberos.la $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp netscape.la $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp radius.la $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --mode=3Dinstall cp apr1.la $(PREFIX)/lib/openldap
=2D $(LIBTOOL) --finish $(PREFIX)/lib
+ rm -rf *.lo *.la *.o .libs/
+
+install: kerberos.la netscape.la radius.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: kerberos.la netscape.la radius.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/passwd/sha2/Makefile b/contrib/slapd-mod=
ules/passwd/sha2/Makefile
index 5dcb1db..d03297d 100644
=2D-- a/contrib/slapd-modules/passwd/sha2/Makefile
+++ b/contrib/slapd-modules/passwd/sha2/Makefile
@@ -1,15 +1,47 @@
# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
=20
=2DOPENLDAP :=3D ../../../..
+CPPFLAGS+=3D-I../../../../include -I../../../../servers/slapd=20
+LIBTOOL=3D../../../../libtool
=20
=2D#CCFLAGS =3D -Wall -g -DSLAPD_SHA2_DEBUG
=2DCCFLAGS =3D -Wall -g
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../../servers/slapd/slapd
=20
=2Dslapd-sha2.so: slapd-sha2.o sha2.o
=2D $(CC) -I$(OPENLDAP)/include -shared -Wall -g $^ -o $@
+all: sha2.la
=20
=2D%.o: %.c
=2D $(CC) -I$(OPENLDAP)/include $(CCFLAGS) -c $<
+%.lo: slapd-sha2.c sha2.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: slapd-sha2.lo sha2.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
=20
clean:
=2D @rm -f slapd-sha2.so *.o
+ rm -rf *.lo *.la *.o .libs/
+
+install: sha2.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: sha2.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
diff --git a/contrib/slapd-modules/trace/Makefile b/contrib/slapd-modules/t=
race/Makefile
new file mode 100644
index 0000000..948ffef
=2D-- /dev/null
+++ b/contrib/slapd-modules/trace/Makefile
@@ -0,0 +1,48 @@
+# $OpenLDAP$
+# Copyright 2011 Buchan Milne <bgmilne@staff.telkomsa.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+CPPFLAGS+=3D-I../../../include -I../../../servers/slapd=20
+CPPFLAGS+=3D-DSLAPD_OVER_TRACE=3DSLAPD_MOD_DYNAMIC
+LIBTOOL=3D../../../libtool
+
+ldap_subdir =3D openldap
+prefix=3D/usr/local
+exec_prefix =3D $(prefix)
+libdir =3D $(exec_prefix)/lib
+libexecdir =3D $(exec_prefix)/libexec
+moduledir =3D $(exec_prefix)/libexec/$(ldap_subdir)
+slapd=3D../../../servers/slapd/slapd
+
+all: trace.la
+
+%.lo: %.c
+ $(LIBTOOL) --mode=3Dcompile $(CC) $(CPPFLAGS) -Wall -c $<
+
+%.la: %.lo
+ $(LIBTOOL) --mode=3Dlink $(CC) -version-info 0:0:0 \
+ -rpath $(moduledir) -module -o $@ $<
+
+clean:
+ rm -rf *.lo *.la *.o .libs/
+
+install: trace.la
+ mkdir -p $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --mode=3Dinstall cp $? $(DESTDIR)$(moduledir)
+ $(LIBTOOL) --finish $(DESTDIR)$(moduledir)
+
+test: trace.la
+ @for i in $?;do \
+ echo "Testing loading module $$i"; \
+ echo "modulepath ." > test-slapd.conf; \
+ echo "moduleload $$i" >> test-slapd.conf; \
+ $(slapd) -T test -f test-slapd.conf && rm -f test-slapd.conf; \
+ done
=2D-=20
1.7.4.4
--Boundary-00=_XqOPP0RBjyQeXED--