On Wed, Apr 14, 2010 at 11:24 PM, Matthijs Möhlmann
<matth...@cacholong.nl> wrote:
>
> Hi,
Hello

>
> I'm willing to include the autogroup contrib module but with
> openldap-2.4.21 it gives some errors.
>
> Are you able to check what's going on here ? And maybe rework the
> patches a bit ?
Great!

Attached is the svn diff of a better patch (debian/changelog not included)

thanks

Mathieu Parent
Index: debian/patches/autogroup-debian-makefile.diff
===================================================================
--- debian/patches/autogroup-debian-makefile.diff	(révision 0)
+++ debian/patches/autogroup-debian-makefile.diff	(révision 0)
@@ -0,0 +1,31 @@
+Index: b/contrib/slapd-modules/autogroup/Makefile
+===================================================================
+--- a/contrib/slapd-modules/autogroup/Makefile	(révision 1257)
++++ b/contrib/slapd-modules/autogroup/Makefile	(copie de travail)
+@@ -1,5 +1,6 @@
+-LIBTOOL=../../../libtool
++LIBTOOL=libtool
+ 
++CPPFLAGS+=-I../../../debian/build/include
+ CPPFLAGS+=-I../../../include -I../../../servers/slapd
+ 
+ all: autogroup.la
+@@ -10,11 +11,16 @@
+ autogroup.la:	autogroup.lo
+ 	$(LIBTOOL) --mode=link $(CC) -version-info 0:0:0 \
+ 	-rpath $(PREFIX)/lib -module -o $@ $? 
++	#Why libtool doesn't call ld, ar and ranlib?
++	ld -Bshareable -o .libs/autogroup.so.0.0.0 .libs/autogroup.o
++	ar cru .libs/autogroup.a autogroup.o
++	ranlib .libs/autogroup.a
+ 
+ clean:
+ 	rm -f autogroup.lo autogroup.la
+ 
+ install: autogroup.la
+-	mkdir -p $(PREFIX)/lib/openldap
+-	$(LIBTOOL) --mode=install cp autogroup.la $(PREFIX)/lib/openldap
++	mkdir -p $(PREFIX)/lib/ldap
++	$(LIBTOOL) --mode=install install -c autogroup.la $(PREFIX)/lib/ldap
+ 	$(LIBTOOL) --finish $(PREFIX)/lib
++
Index: debian/patches/series
===================================================================
--- debian/patches/series	(révision 1257)
+++ debian/patches/series	(copie de travail)
@@ -10,3 +10,4 @@
 getaddrinfo-is-threadsafe
 do-not-second-guess-sonames
 shutdown-issue-6322
+autogroup-debian-makefile.diff
Index: debian/rules
===================================================================
--- debian/rules	(révision 1257)
+++ debian/rules	(copie de travail)
@@ -36,6 +36,7 @@
 slapddir	:= $(CURDIR)/debian/slapd/usr/sbin
 
 MAKEVARS	:= DESTDIR=$(installdir) STRIP=
+MAKEVARS_autogroup := PREFIX=$(installdir)/usr
 
 # Include the quilt patch system.
 include /usr/share/quilt/quilt.make
@@ -105,6 +106,7 @@
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	RESOLV_MULTI=off $(MAKE) -C $(builddir) test
 endif
+	$(MAKE) -C $(CURDIR)/contrib/slapd-modules/autogroup $(MAKEVARS_autogroup)
 	touch $@
 
 # Check all built libraries for unresolved symbols except for the libslapi
@@ -114,6 +116,7 @@
 install: install-stamp
 install-stamp: build-stamp
 	$(MAKE) -C $(builddir) $(MAKEVARS) install
+	$(MAKE) -C $(CURDIR)/contrib/slapd-modules/autogroup $(MAKEVARS_autogroup) install
 	for F in $(installdir)/usr/lib/*.so.*.*.*; do \
 	    if echo "$$F" | grep -q libslapi ; then \
 	        continue; \
@@ -184,6 +187,7 @@
 	dh_testdir
 	dh_testroot
 	rm -f install-stamp build-stamp configure-stamp
+	$(MAKE) -C $(CURDIR)/contrib/slapd-modules/autogroup $(MAKEVARS_autogroup) clean
 	# Update translation templates for debconf
 	debconf-updatepo
 	# Remove our stripped schema from the upstream source area.

Reply via email to