[libntl] 01/01: Redo debian/rules in modern style

Ximin Luo infinity0 at debian.org
Thu Oct 19 19:07:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository libntl.

commit a799cd181103de03330b2d0a6e6c02161c8e8f3d
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Oct 19 21:07:23 2017 +0200

    Redo debian/rules in modern style
    
    The previous rules had complex targets with incorrect dependency declarations
    in order to avoid running the wizard. But we can just do TUNE=generic instead.
---
 debian/changelog |  9 +++++++
 debian/rules     | 74 ++++++++++++--------------------------------------------
 2 files changed, 25 insertions(+), 58 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6f93fcc..3991f76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 ntl (10.5.0-1) UNRELEASED; urgency=medium
 
+  [ Julien Puydt ]
   * New upstream release.
   * Bump dh compat to 10.
   * Bump std-ver to 4.0.1.
@@ -10,6 +11,14 @@ ntl (10.5.0-1) UNRELEASED; urgency=medium
   * Follow the soname bump from 27 to 35.
   * Enable linking to gf2x (Closes: #872711).
 
+  [ Ximin Luo ]
+  * Don't set MAKEFLAGS. Together with the incompletely-duplicated dependency
+    information in d/rules, it was causing subtle miscompilations which
+    resulted in test failures on other packages (FLINT). See "Recursive Make
+    considered harmful" for a description of this general problem.
+  * Rewrite d/rules in modern debhelper style, removing the bad dependency
+    information in the process.
+
  -- Julien Puydt <julien.puydt at laposte.net>  Wed, 30 Aug 2017 21:30:38 +0200
 
 ntl (9.9.1-3) unstable; urgency=medium
diff --git a/debian/rules b/debian/rules
index d0d31bb..33e5ee9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,74 +9,32 @@ LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
 CXXFLAGS += -Wall
 
-build: build-arch-stamp
-build-arch: build-arch-stamp
-build-indep:
+%:
+	dh $@
 
-# with pattern rules multiple targets means those are generated
-# by one invocation, so this is a pattern rule...
-include/NTL/con%ig.h src/src/m%ileout src/make%ile src/c%ileout: src/configure src/m%ile src/c%ile src/DoConfig
+override_dh_auto_configure:
 	cd src && ./configure \
 		SHARED=on NATIVE=off \
 		CPPFLAGS='$(CPPFLAGS)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' \
 		DEF_PREFIX='/usr' \
 		NTL_GMP_LIP=on SHARED=on \
-		NTL_GF2X_LIB=on
+		NTL_GF2X_LIB=on \
+		TUNE=generic
 
-include/NTL/mach_desc.h: src/makefile include/NTL/config.h src/cfileout
-	# TODO: better make that file static and check it is correct than
-	# generating it this way and perhaps miss something (extended doubles)
-	$(MAKE) -C src setup1
+override_dh_auto_build:
+	dh_auto_build -D src
 
-src/GetPID.c: src/makefile
-	$(MAKE) -C src setup2
+override_dh_auto_install:
+	dh_auto_install -D src
 
-src/GetTime.c:
-	# This should be the correct one:
-	cp src/GetTime2.cpp src/GetTime.cpp
-
-include/NTL/gmp_aux.h: src/makefile include/NTL/config.h src/cfileout \
-			include/NTL/mach_desc.h
-	# this also generates src/lip_gmp_aux_impl.h, which is not used
-	# but src/makefile requires it anyway, so it cannot be removed here
-	$(MAKE) -C src setup3
-
-build-arch-stamp: src/makefile include/NTL/config.h src/cfileout \
-		include/NTL/mach_desc.h src/GetTime.c include/NTL/gmp_aux.h src/GetPID.c
-	# ntl.a is quite a misnomer, this is the actual idempotent build target
-	$(MAKE) -C src ntl.a
-	touch $@
-
-clean:
-	if test -e src/makefile ; then $(MAKE) -C src clobber ;fi
-	rm -f build-arch-stamp
+override_dh_auto_clean:
+	dh_auto_clean -D src
 	rm -f src/makefile include/NTL/config.h
-	dh_clean
 
-binary: binary-arch binary-indep
-binary-indep:
-
-binary-arch: build-arch-stamp
-	dh_testdir
-	dh_testroot
-	dh_prep
-	$(MAKE) -C src install PREFIX='$(CURDIR)/debian/tmp/usr'
+override_dh_install:
 	dh_install
-	dh_installchangelogs
-	mv debian/tmp/usr/share/doc/NTL debian/libntl*-dev/usr/share/doc/libntl*-dev/
-	dh_installexamples
-	dh_installdocs
-	dh_installman
-	dh_lintian
-	dh_link
-	dh_strip
-	dh_makeshlibs -V
-	dh_shlibdeps
-	dh_compress -X/NTL/
-	dh_fixperms
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+	mkdir -p debian/libntl-dev/usr/share/doc/libntl-dev/
+	mv debian/tmp/usr/share/doc/NTL debian/libntl-dev/usr/share/doc/libntl-dev/
 
-.PHONY: build build-arch build-indep clean binary binary-arch binary-indep
+override_dh_compress:
+	dh_compress -X/NTL/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libntl.git



More information about the debian-science-commits mailing list