[Pkg-haskell-commits] darcs: ghc: Refactor rules file to use dh, patch by Gianfranco

Joachim Breitner mail at joachim-breitner.de
Fri Jul 3 12:30:08 UTC 2015


Fri Jul  3 10:25:39 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Refactor rules file to use dh, patch by Gianfranco

    M ./changelog +1
    M ./rules -91 +25

Fri Jul  3 10:25:39 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Refactor rules file to use dh, patch by Gianfranco
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2015-07-03 12:30:08.611024742 +0000
+++ new-ghc/changelog	2015-07-03 12:30:08.635024760 +0000
@@ -3,6 +3,7 @@
   * New upstream release candidate, 7.10.2-rc2
   * Clean up debian/control a bit, based on a patch by Gianfranco
   * Bump std version (patch by Gianfranco)
+  * Refactor rules file to use dh, patch by Gianfranco
 
  -- Joachim Breitner <nomeata at debian.org>  Fri, 03 Jul 2015 12:19:04 +0200
 
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules	2015-07-03 12:30:08.611024742 +0000
+++ new-ghc/rules	2015-07-03 12:30:08.627024754 +0000
@@ -37,17 +37,11 @@
 BUILD_HADDOCK_DOCS=YES
 DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/
 
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    MAKEFLAGS += -j$(NUMJOBS)
-endif
+%:
+	dh $@ --with autotools-dev
 
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
+override_dh_auto_configure:
 	dh_autoreconf perl -- boot
-
-	rm -f mk/build.mk
 	echo "SRC_HC_OPTS += -lffi -optl-pthread" >> mk/build.mk
 	echo "HADDOCK_DOCS := YES" >> mk/build.mk
 	echo "XSLTPROC_OPTS += --nonet" >> mk/build.mk
@@ -91,23 +85,14 @@
 	echo 'psdir   := $$(docdir)'                   >> mk/build.mk
 	# We want verbose builds
 	echo 'V=1'                                     >> mk/build.mk
-	rm -f config.sub
-	rm -f config.guess
-	ln -s /usr/share/misc/config.sub .
-	ln -s /usr/share/misc/config.guess .
 	./configure $(confflags) --prefix=/usr \
 		$(EXTRA_CONFIGURE_FLAGS) \
 		--with-system-libffi \
 		--with-llc=llc-3.5 \
 		--with-opt=opt-3.5
 
-	touch $@
-
-build: build-stamp
-build-stamp: configure-stamp
-	dh_testdir
-	$(MAKE) $(MAKEFLAGS)
-
+override_dh_auto_build:
+	dh_auto_build
 	# Do some very simple tests that the compiler actually works
 	rm -rf debian/testghc
 	mkdir debian/testghc
@@ -120,19 +105,11 @@
 	[ "$$(debian/testghc/foo)" = "Foo" ]
 	rm debian/testghc/*
 
-	touch $@
-
 FILES = \( -type f -o -type l \)
 PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \)
 
-install: install-stamp
-install-stamp: build-stamp
-	dh_testdir
-	dh_testroot
-	dh_prep
-
-	# Install the basic stuff
-	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+override_dh_auto_install:
+	dh_auto_install
 
 	# Delete all the library LICENSE files
 	rm -f debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/LICENSE
@@ -224,15 +201,10 @@
 	sed -i s,^debian/tmp,, debian/*.install debian/*.links
 	rm -f debian/ghc.links
 	echo "/var/lib/ghc/package.conf.d /usr/lib/ghc/package.conf.d" >> debian/ghc.links
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f configure-stamp build-stamp install-stamp binary-arch-stamp binary-indep-stamp
-	rm -f configure
 
-	$(MAKE) distclean
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -f mk/build.mk
 
 	rm -f debian/*.install
 	rm -f debian/*.1
@@ -264,56 +236,18 @@
 	rm -f libraries/haskeline/a.out
 	rm -rf utils/ghctags/dist-install
 
-	rm -f config.sub config.guess
-	
-	dh_autoreconf_clean
-	dh_clean
+override_dh_compress:
+	dh_compress -X.haddock -X.txt
 
-binary-arch: binary-arch-stamp
-binary-arch-stamp: install-stamp
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -a
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_install -a
-	dh_installmenu -a
-	dh_installman -a
-	dh_strip
-	dh_link -a
-	dh_compress -X.haddock -X.txt -a
-	dh_fixperms -a
+override_dh_installdeb:
 	sh debian/dh_haskell_provides
-	dh_installdeb -a
+	dh_installdeb
+
+override_dh_shlibdeps:
 	dh_shlibdeps -XlibHS
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-	touch $@
-
-# binary-indep and binary-arch both build everything, as otherwise
-# "dh_install --fail-missing" falls over
-
-# Build architecture independant packages using the common target.
-binary-indep: binary-indep-stamp
-binary-indep-stamp: install-stamp
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -i
-	dh_installdocs -i
-	dh_installexamples -i
-	dh_installdirs -i
-	dh_install -i
-	dh_installmenu -i
-	dh_installman -i
-	dh_link -i
-	dh_compress -X.haddock -X.txt -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-	touch $@
 
-binary: binary-indep binary-arch
-.PHONY: build install clean binary-indep binary-arch binary-common binary patch
+# we do not want shlibs files there, neither postrm scripts
+override_dh_makeshlibs:
+
+# we have ghc-testsuite for this, empty override
+override_dh_auto_test:




More information about the Pkg-haskell-commits mailing list