[Pkg-openldap-devel] r1386 - openldap/trunk/debian

vorlon at alioth.debian.org vorlon at alioth.debian.org
Sat Oct 8 19:57:29 UTC 2011


Author: vorlon
Date: 2011-10-08 19:57:29 +0000 (Sat, 08 Oct 2011)
New Revision: 1386

Added:
   openldap/trunk/debian/clean
Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/compat
   openldap/trunk/debian/rules
Log:
Convert debian/rules to dh(1).

Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2011-10-08 18:47:02 UTC (rev 1385)
+++ openldap/trunk/debian/changelog	2011-10-08 19:57:29 UTC (rev 1386)
@@ -6,6 +6,7 @@
   * Use dh_autoreconf instead of a locally-patched autogen.sh.
   * debian/patches/no-AM_INIT_AUTOMAKE: don't use AM_INIT_AUTOMAKE macro
     when we aren't using automake.
+  * Convert debian/rules to dh(1).
 
  -- Steve Langasek <vorlon at debian.org>  Sun, 21 Aug 2011 11:25:07 -0700
 

Added: openldap/trunk/debian/clean
===================================================================
--- openldap/trunk/debian/clean	                        (rev 0)
+++ openldap/trunk/debian/clean	2011-10-08 19:57:29 UTC (rev 1386)
@@ -0,0 +1,2 @@
+debian/libldap-2.4-2.links
+debian/libldap2-dev.links

Modified: openldap/trunk/debian/compat
===================================================================
--- openldap/trunk/debian/compat	2011-10-08 18:47:02 UTC (rev 1385)
+++ openldap/trunk/debian/compat	2011-10-08 19:57:29 UTC (rev 1386)
@@ -1 +1 @@
-7
+9

Modified: openldap/trunk/debian/rules
===================================================================
--- openldap/trunk/debian/rules	2011-10-08 18:47:02 UTC (rev 1385)
+++ openldap/trunk/debian/rules	2011-10-08 19:57:29 UTC (rev 1386)
@@ -14,30 +14,16 @@
     CFLAGS += -O2
 endif
 
-# Tell Autoconf the correct system types.
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-    SYSTEM = --build $(DEB_HOST_GNU_TYPE)
-else
-    SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-SYSTEM += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 
 CONFIG		= $(shell grep -v "^\#" debian/configure.options)
 
-installdir	:= $(CURDIR)/debian/install
-tmpdir		:= $(CURDIR)/debian/tmp
+installdir	:= $(CURDIR)/debian/tmp
 builddir	:= $(CURDIR)/debian/build
 slapddir	:= $(CURDIR)/debian/slapd/usr/sbin
 
-MAKEVARS	:= DESTDIR=$(installdir) STRIP=
+MAKEVARS	:= STRIP=
 
-# Include the quilt patch system.
-include /usr/share/quilt/quilt.make
-
 # These variables are used only by get-orig-source, which will normally only
 # be run by maintainers.
 VERSION = 2.4.25
@@ -64,8 +50,10 @@
 	rm -r openldap_$(VERSION).orig
 	gzip -9 openldap_$(VERSION).orig.tar
 
-configure: configure-stamp
-configure-stamp: $(QUILT_STAMPFN)
+%:
+	dh $@ --with quilt,autoreconf --builddirectory=$(builddir)
+
+override_dh_auto_configure:
 	# Check if we include the RFCs, Internet-Drafts, or upstream schemas
 	# with RFC text (which are non DFSG-free).  You can set DFSG_NONFREE
 	# to build the packages from the unchanged upstream sources but Debian
@@ -84,39 +72,30 @@
 	    done; \
 	fi
 
-	cp -f /usr/share/misc/config.* build/
 	cp -f /usr/share/misc/config.* contrib/ldapc++/
-	mkdir -p $(builddir)
 
-	dh_autoreconf
-	cd $(builddir) && CFLAGS="$(CFLAGS)" $(CURDIR)/configure \
-		$(CONFIG) $(SYSTEM)
+	dh_auto_configure -- CFLAGS="$(CFLAGS)" $(CONFIG)
 	perl debian/check_config
 	$(MAKE) -C $(builddir) depend
-	touch $@
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep:
-build-stamp: configure-stamp
-	$(MAKE) -C $(builddir) $(MAKEVARS)
+override_dh_auto_build:
+	dh_auto_build -- $(MAKEVARS)
 	$(MAKE) -C contrib/slapd-modules/smbk5pwd
 	$(MAKE) -C contrib/slapd-modules/autogroup
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	RESOLV_MULTI=off $(MAKE) -C $(builddir) test
-endif
-	touch $@
 
+override_dh_auto_test:
+	dh_auto_test -- RESOLV_MULTI=off
+
+
 # Check all built libraries for unresolved symbols except for the libslapi
 # library.  It is a special case since the SLAPI interface depends on symbols
 # defined in slapd itself.  Those symbols will remain unresolved until the
 # plugin is loaded into slapd.
-install: install-stamp
-install-stamp: build-stamp
-	$(MAKE) -C $(builddir) $(MAKEVARS) install
+override_dh_auto_install:
+	dh_auto_install -- $(MAKEVARS)
 	$(MAKE) -C contrib/slapd-modules/smbk5pwd install DESTDIR=$(installdir)
 	$(MAKE) -C contrib/slapd-modules/autogroup install DESTDIR=$(installdir)
-	
+
 	# Empty the dependency_libs file in the .la files.
 	for F in $(installdir)/usr/lib/ldap/*.la; do \
 		sed -i "s/^dependency_libs=.*/dependency_libs=''/" $$F; \
@@ -137,45 +116,32 @@
 	# Upstream manpages are section 8C but installed as section 8
 	find $(installdir)/usr/share/man -name \*.8 \
 		| xargs perl -pi -e 's#(\.TH \w+ 8)C#$$1#'
-	touch $@
 
-binary: binary-arch binary-indep
-binary-indep:
-binary-arch: install-stamp
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-
-	dh_installdirs -a
-	cp -al $(installdir) $(tmpdir)
-
-	dh_install -a
+override_dh_install:
+	dh_install
 	rm -rf $(CURDIR)/debian/slapd/usr/lib/ldap/smbk5pwd*
 	chmod 0755 $(CURDIR)/debian/slapd/usr/share/slapd/ldiftopasswd
 
-	dh_installchangelogs -a
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installman -a
-	dh_installinit -Xslapd.prerm -a -- "defaults 19 80"
-	dh_installdebconf -a
-	dh_lintian -a
+override_dh_installinit:
+	dh_installinit -Xslapd.prerm -- "defaults 19 80"
+
+override_dh_strip:
 	dh_strip -plibldap-2.4-2 --dbg-package=libldap-2.4-2-dbg
 	dh_strip -pslapd --dbg-package=slapd-dbg
-	dh_strip -pldap-utils
-	dh_strip -pslapd-smbk5pwd
+	dh_strip -Nlibldap-2.4-2 -Nslapd
+
+override_dh_link:
 	for pkg in libldap2-dev libldap-2.4-2; do \
 		sed -e"s/\$${DEB_HOST_MULTIARCH}/$(DEB_HOST_MULTIARCH)/g" < debian/$$pkg.links.in > debian/$$pkg.links; \
 	done
-	dh_link -a
+	dh_link
 
 	# hardlink these so not confined by apparmor
 	for f in slapacl slapadd slapauth slapcat slapdn slapindex slappasswd slaptest slapschema ; do \
 	    ln -f $(slapddir)/slapd $(slapddir)/$$f ; \
-	done ;
+	done
 
-	dh_compress -a
-	dh_fixperms -a
+override_dh_makeshlibs:
 	# ideally we would do this and not have any libldap-2.4.so.2 links
 	# at all, but that requires adjusting the build scripts first to
 	# link against libldap_r, otherwise dh_shlibdeps fails
@@ -185,19 +151,18 @@
 		                      s/\.so\./-/; p; q }' \
 	)" >> debian/slapd.substvars
 	dh_makeshlibs -pslapd -X/usr/lib/ldap/ -V "$$(sed -ne's/slapd:Provides=//p' debian/slapd.substvars)"
-	dh_installdeb -a
+
+override_dh_installdeb:
+	dh_installdeb
 	perl -w debian/dh_installscripts-common -p slapd
-	dh_shlibdeps -a -L libldap-2.4-2 -l $(installdir)/usr/lib/$(DEB_HOST_MULTIARCH)
+
+override_dh_gencontrol:
 	# Strip duplicate dependency out of substvars.
 	sed -i -e 's/ libldap-2.4-2,//' debian/*.substvars
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
+	dh_gencontrol
 
-clean: unpatch
-	dh_testdir
-	dh_testroot
-	rm -f install-stamp build-stamp configure-stamp
+override_dh_auto_clean:
+	dh_auto_clean
 	# Update translation templates for debconf
 	debconf-updatepo
 	# Remove our stripped schema from the upstream source area.
@@ -207,14 +172,9 @@
 	    done; \
 	fi
 
-	dh_autoreconf_clean
 	# Remove updated config.guess and config.sub for a clean diff.
 	rm -f contrib/ldapc++/config.sub contrib/ldapc++/config.guess
-	rm -rf $(builddir) $(builddir_notls) $(installdir)
 
-	# Remove autogenerated links files
-	rm -f debian/libldap-2.4-2.links debian/libldap2-dev.links
-	
 	# Clean the contrib directory
 	rm -rf contrib/slapd-modules/smbk5pwd/.libs \
 		contrib/slapd-modules/smbk5pwd/smbk5pwd.lo \
@@ -225,6 +185,3 @@
 		contrib/slapd-modules/autogroup/autogroup.la \
 		contrib/slapd-modules/autogroup/autogroup.o
 	dh_clean
-
-.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
-.PHONY: install




More information about the Pkg-openldap-devel mailing list