[Pkg-openldap-devel] Bug#592362: please include passwd-netscape module

John Morrissey jwm at horde.net
Mon Aug 9 14:31:11 UTC 2010


Package: slapd
Version: 2.4.23-2
Severity: wishlist
Tags: patch

We use the passwd-netscape contrib module locally, so slapd can grok
NS-MTA-MD5 password hashes.

This debdiff adds support for building/packaging this module.

The upstream Makefile isn't usable directly (the build fails due to missing
include paths, plus its install target wants to build all of the other
modules in that directory). Calling libtool directly from debian/rules seems
like the most straightforward way to build, short of patching the upstream
Makefile.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
diff -u openldap-2.4.23/debian/slapd.install openldap-2.4.23/debian/slapd.install
--- openldap-2.4.23/debian/slapd.install
+++ openldap-2.4.23/debian/slapd.install
@@ -2,6 +2,7 @@
 debian/tmp/usr/lib/slapd usr/sbin
 debian/tmp/usr/lib/ldap/*.so* usr/lib/ldap
 debian/tmp/usr/lib/ldap/*.la usr/lib/ldap
+debian/tmp/usr/lib/ldap/passwd-netscape.so* usr/lib/ldap
 debian/tmp/usr/lib/libslapi-*.so.* usr/lib
 debian/ldiftopasswd usr/share/slapd
 debian/DB_CONFIG usr/share/slapd
diff -u openldap-2.4.23/debian/rules openldap-2.4.23/debian/rules
--- openldap-2.4.23/debian/rules
+++ openldap-2.4.23/debian/rules
@@ -104,6 +104,9 @@
 	$(MAKE) -C $(builddir) $(MAKEVARS)
 	$(MAKE) -C contrib/slapd-modules/smbk5pwd
 	$(MAKE) -C contrib/slapd-modules/autogroup
+	mkdir -p $(builddir)/contrib/slapd-modules/passwd
+	$(builddir)/libtool --mode=compile $(CC) $(CPPFLAGS) -Iinclude -Iservers/slapd -I$(builddir)/include -c contrib/slapd-modules/passwd/netscape.c -o $(builddir)/contrib/slapd-modules/passwd/passwd-netscape.o
+	$(builddir)/libtool --mode=link $(CC) -version-info 0:0:0 -rpath $(builddir)/libraries/libldap -module -o $(builddir)/contrib/slapd-modules/passwd/passwd-netscape.la $(builddir)/contrib/slapd-modules/passwd/passwd-netscape.lo
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	RESOLV_MULTI=off $(MAKE) -C $(builddir) test
 endif
@@ -118,6 +121,8 @@
 	$(MAKE) -C $(builddir) $(MAKEVARS) install
 	$(MAKE) -C contrib/slapd-modules/smbk5pwd install DESTDIR=$(installdir)
 	$(MAKE) -C contrib/slapd-modules/autogroup install DESTDIR=$(installdir)
+	$(builddir)/libtool --mode=install cp $(builddir)/contrib/slapd-modules/passwd/passwd-netscape.la $(installdir)/usr/lib/ldap
+	$(builddir)/libtool --finish $(installdir)/usr/lib/ldap
 	for F in $(installdir)/usr/lib/*.so.*.*.*; do \
 	    if echo "$$F" | grep -q libslapi ; then \
 	        continue; \


More information about the Pkg-openldap-devel mailing list