[pkg-d-commits] [ldc] 03/03: d/rules: Switch to minimal dh style

Matthias Klumpp mak at moszumanska.debian.org
Mon Oct 3 14:12:23 UTC 2016


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

mak pushed a commit to branch master
in repository ldc.

commit d48320c815f5a999616a1ed3341655a07d67f54a
Author: Matthias Klumpp <matthias at tenstral.net>
Date:   Mon Oct 3 15:41:17 2016 +0200

    d/rules: Switch to minimal dh style
---
 debian/rules | 75 ++++++++++++++++++------------------------------------------
 1 file changed, 22 insertions(+), 53 deletions(-)

diff --git a/debian/rules b/debian/rules
index b318fdf..8485c2b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,70 +1,39 @@
 #!/usr/bin/make -f
+# -*- makefile -*-
+#export DH_VERBOSE=1
 
-include /usr/share/quilt/quilt.make
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 CFLAGS += $(CPPFLAGS)
 CXXFLAGS += $(CPPFLAGS)
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-	JOBS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-endif
+%:
+	dh $@ --parallel
 
-configure: configure-stamp
-configure-stamp: patch
-	dh_testdir
+override_dh_auto_configure:
 	[ -d build-static ] || mkdir build-static
-	(cd build-static && LDFLAGS='-z relro' CXXFLAGS='-g -O2' \
-		cmake -DCMAKE_INSTALL_PREFIX='/usr' -DBUILD_SHARED_LIBS=off -DINCLUDE_INSTALL_DIR='/usr/lib/ldc/${DEB_HOST_MULTIARCH}/include/d' ..)
-	[ -d build-shared ] || mkdir build-shared
-	(cd build-shared && LDFLAGS='-z relro' CXXFLAGS='-g -O2' \
-		cmake -DCMAKE_INSTALL_PREFIX='/usr' -DBUILD_SHARED_LIBS=on -DINCLUDE_INSTALL_DIR='/usr/lib/ldc/${DEB_HOST_MULTIARCH}/include/d' ..)
+	dh_auto_configure -D$(CURDIR) -B$(CURDIR)/build-static -- -DBUILD_SHARED_LIBS=OFF -DINCLUDE_INSTALL_DIR='/usr/lib/ldc/${DEB_HOST_MULTIARCH}/include/d'
 
-	touch $@
+	[ -d build-shared ] || mkdir build-shared
+	dh_auto_configure -D$(CURDIR) -B$(CURDIR)/build-shared -- -DBUILD_SHARED_LIBS=ON -DINCLUDE_INSTALL_DIR='/usr/lib/ldc/${DEB_HOST_MULTIARCH}/include/d'
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp: configure-stamp
-	dh_testdir
-	(cd build-static && $(MAKE) VERBOSE=1 $(JOBS))
-	(cd build-shared && $(MAKE) VERBOSE=1 $(JOBS))
-	touch $@
+override_dh_auto_build:
+	dh_auto_build -Bbuild-static
+	dh_auto_build -Bbuild-shared
 
-clean: unpatch
-	dh_testdir
-	dh_testroot
-	rm -rf build-static build-shared
-	rm -f configure-stamp build-stamp
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_prep
+override_dh_auto_install:
 	(cd build-static && $(MAKE) install DESTDIR="$(CURDIR)/debian/tmp")
 	(cd build-shared && $(MAKE) install DESTDIR="$(CURDIR)/debian/tmp")
 
-binary-arch: build
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
+override_dh_install:
 	dh_install --list-missing
-	dh_installdocs
+
+override_dh_installman:
 	dh_installman debian/ldc2.1 debian/ldmd2.1
-	dh_installchangelogs
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_makeshlibs
-	dh_installdeb
+
+override_dh_shlibdeps:
 	dh_shlibdeps -Llibphobos2-ldc71
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
 
-binary: binary-indep binary-arch
-.PHONY: configure build clean binary-indep binary-arch binary
+override_dh_clean:
+	rm -rf build-static build-shared
+	rm -f configure-stamp build-stamp
+	dh_clean

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list