[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: followup to irc conversation about building 7.8 with 7.6



Hi again,


>This will simplify (hopefully) a little bit our rules file, but might introduce some regressions, I
>guess this is ok for 7.10 ;)
I didn't simplify too much the build unfortunately, but this should be good.


I'm attaching three patches that can be applied on top of the debian packaging (experimental)

I'm testing the builds right now :)

cheers,

G.
From 2b743035588ef9ac342b98e59dceaa4a2133cec2 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Sat, 27 Jun 2015 13:35:08 +0200
Subject: [PATCH 1/3] Wrap and sort

---
 debian/control   | 86 ++++++++++++++++++++++++++++++--------------------------
 debian/copyright |  2 +-
 2 files changed, 47 insertions(+), 41 deletions(-)

diff --git a/debian/control b/debian/control
index c6f10b7..00242d7 100644
--- a/debian/control
+++ b/debian/control
@@ -3,51 +3,57 @@ Section: haskell
 Priority: extra
 Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
 Uploaders: Joachim Breitner <nomeata@debian.org>,
- Erik de Castro Lopo <erikd@mega-nerd.com>
+           Erik de Castro Lopo <erikd@mega-nerd.com>
 Standards-Version: 3.9.5
-Build-Depends:
-  debhelper (>= 9),
-  libgmp-dev,
-  devscripts,
-  ghc,
-  grep-dctrl,
-  dh-autoreconf,
-  autotools-dev,
-  llvm-3.5 [arm64 armel armhf],
-  libffi-dev,
-  pkg-config,
-  xsltproc,
-  docbook-xsl,
-  docbook-xml,
-  binutils [arm64 armel armhf],
-  libncurses5-dev,
-  dpkg-dev (>= 1.16.1.1)
-Build-Depends-Indep:
-  hscolour,
-  fop
-Build-Conflicts:
-  ccache
+Build-Depends: autotools-dev,
+               binutils [arm64 armel armhf],
+               debhelper (>= 9),
+               devscripts,
+               dh-autoreconf,
+               docbook-xml,
+               docbook-xsl,
+               dpkg-dev (>= 1.16.1.1),
+               ghc,
+               grep-dctrl,
+               libffi-dev,
+               libgmp-dev,
+               libncurses5-dev,
+               llvm-3.5 [arm64 armel armhf],
+               pkg-config,
+               xsltproc
+Build-Depends-Indep: fop, hscolour
+Build-Conflicts: ccache
 Homepage: http://haskell.org/ghc/
 Vcs-Darcs: http://darcs.debian.org/pkg-haskell/ghc
 Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/ghc
 
 Package: ghc
 Architecture: any
-Depends: llvm-3.5 [arm64 armel armhf], gcc, libgmp-dev, libffi-dev, libbsd-dev, libc6-dev, libncurses5-dev, ${shlibs:Depends}, ${misc:Depends}
+Depends: gcc,
+         libbsd-dev,
+         libc6-dev,
+         libffi-dev,
+         libgmp-dev,
+         libncurses5-dev,
+         llvm-3.5 [arm64 armel armhf],
+         ${misc:Depends},
+         ${shlibs:Depends}
 Pre-Depends: dpkg (>= 1.16.1)
-Provides:
-  haskell-compiler,
-  ${provided-devs},
-  ${haskell:Provides},
-  ${ghci},
-  ghc-dynamic,
-  haddock,
-  ghc-haddock,
-  ${haddock:Provides}
-Replaces: ghc6 (<< 7), ghc-dynamic (<< 7.8), ghc-haddock (<< 7.10)
-Conflicts: ghc6 (<< 7), ghc-dynamic (<< 7.8), ${conflicting-devs}
-Breaks: cabal-install (<< 0.8.0), haskell-devscripts (<< 0.8.13), ghc-doc (<< 7.10), ghc-haddock (<< 7.10)
-Suggests: perl, ghc-prof, ghc-doc, haskell-doc, llvm-3.5
+Provides: ghc-dynamic,
+          ghc-haddock,
+          haddock,
+          haskell-compiler,
+          ${ghci},
+          ${haddock:Provides},
+          ${haskell:Provides},
+          ${provided-devs}
+Replaces: ghc-dynamic (<< 7.8), ghc-haddock (<< 7.10), ghc6 (<< 7)
+Conflicts: ghc-dynamic (<< 7.8), ghc6 (<< 7), ${conflicting-devs}
+Breaks: cabal-install (<< 0.8.0),
+        ghc-doc (<< 7.10),
+        ghc-haddock (<< 7.10),
+        haskell-devscripts (<< 0.8.13)
+Suggests: ghc-doc, ghc-prof, haskell-doc, llvm-3.5, perl
 Description: The Glasgow Haskell Compilation system
  The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for
  Haskell.
@@ -59,7 +65,7 @@ Description: The Glasgow Haskell Compilation system
 
 Package: ghc-prof
 Architecture: any
-Provides: ${provided-profs}, ${haskell:Provides}
+Provides: ${haskell:Provides}, ${provided-profs}
 Depends: ghc (= ${binary:Version}), ${misc:Depends}
 Replaces: ghc6-prof (<< 7)
 Conflicts: ghc6-prof (<< 7)
@@ -82,8 +88,8 @@ Architecture: all
 Suggests: haskell-doc
 Provides: ${provided-docs}
 Replaces: ghc6-doc (<< 7)
-Conflicts: ghc6-doc (<< 7), ghc (<= 7.0.3-1)
-Depends: ${haddock:Depends}, ${misc:Depends}, perl
+Conflicts: ghc (<= 7.0.3-1), ghc6-doc (<< 7)
+Depends: perl, ${haddock:Depends}, ${misc:Depends}
 Pre-Depends: dpkg (>= 1.16.1)
 Description: Documentation for the Glasgow Haskell Compilation system
  The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for
diff --git a/debian/copyright b/debian/copyright
index 07b1ed9..fbb45d1 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -49,7 +49,7 @@ DAMAGE.
 
 
 GHC includes libffi.
-libffi - Copyright (c) 1996-2008  Red Hat, Inc and others.  
+libffi - Copyright (c) 1996-2008  Red Hat, Inc and others.
 See source files for details.
 
 Permission is hereby granted, free of charge, to any person obtaining
-- 
2.1.4

From 31e208af50c1a3947734353218bcd3e346da60c0 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Sat, 27 Jun 2015 13:35:19 +0200
Subject: [PATCH 2/3] Bump std version

---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 00242d7..59fbb94 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: extra
 Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
 Uploaders: Joachim Breitner <nomeata@debian.org>,
            Erik de Castro Lopo <erikd@mega-nerd.com>
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
 Build-Depends: autotools-dev,
                binutils [arm64 armel armhf],
                debhelper (>= 9),
-- 
2.1.4

From 3547b577b2318aacb8cee3a61845809beaecc443 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Sat, 27 Jun 2015 13:38:30 +0200
Subject: [PATCH 3/3] Update rules and changelog

---
 debian/changelog |   8 +++++
 debian/rules     | 102 ++++++++++---------------------------------------------
 2 files changed, 25 insertions(+), 85 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f3f9559..cba5061 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ghc (7.10.1.20150612-2) experimental; urgency=medium
+
+  * Bump std-version
+  * Refactor rules file
+  * Wrap and sort
+
+ -- Gianfranco Costamagna <costamagnagianfranco@yahoo.it>  Sat, 27 Jun 2015 13:37:52 +0200
+
 ghc (7.10.1.20150612-1) experimental; urgency=medium
 
   * Calculate haddock interface version using the built haddock, not the
diff --git a/debian/rules b/debian/rules
index aae0a64..182ba33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,17 +37,11 @@ EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)"
 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,15 @@ endif
 	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 +106,11 @@ build-stamp: configure-stamp
 	[ "$$(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 +202,10 @@ endif
 	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 +237,15 @@ clean:
 	rm -f libraries/haskeline/a.out
 	rm -rf utils/ghctags/dist-install
 
-	rm -f config.sub config.guess
-	
-	dh_autoreconf_clean
-	dh_clean
-
-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_compress:
+	dh_compress -X.haddock -X.txt
+
+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
-- 
2.1.4


Reply to: