Sorry, that last patch was idiotic.  Here's a better one.

This needs to be tested against a package for which DEB_ENABLE_HOOGLE is
significant.  I'm not familiar with how Hoogle organises its files, but
perhaps you have such a package in mind.

-- 
Sean Whitton
From 326cc49097ffcf9b8ff7683fac3eb19eaba57368 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhit...@spwhitton.name>
Date: Mon, 9 May 2016 18:47:22 -0700
Subject: [PATCH] Respect the user's debian/libghc-*-doc.links

---
 Dh_Haskell.sh    | 6 +++---
 debian/changelog | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 1c187fd..5887aa8 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -351,7 +351,6 @@ clean_recipe(){
     run rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
     run rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
     run rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
-    run rm -f debian/libghc-${CABAL_PACKAGE}-doc.links debian/libghcjs-${CABAL_PACKAGE}-doc.links
     if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then
       run sed -i '/binary-or-shlib-defines-rpath/ d' ${DEB_LINTIAN_OVERRIDES_FILE}
       run find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete;
@@ -506,8 +505,9 @@ install_doc_recipe(){
     if [ "${DEB_ENABLE_HOOGLE}" = "yes" ]
     then
         run find debian/${PKG}/${htmldir} -name "*.txt" \
-            -printf "%p ${hoogle}/${PKG}.txt\n" >> debian/lib${hc}-${CABAL_PACKAGE}-doc.links
-        run sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links
+            -printf "%p ${hoogle}/${PKG}.txt" \
+            | sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links \
+            xargs dh_link
     fi
     run dh_haskell_depends -p${PKG}
     # PS4=$PS5
diff --git a/debian/changelog b/debian/changelog
index ef23643..f1b342f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
 haskell-devscripts (0.10.2.4) UNRELEASED; urgency=medium
 
+  [ James McCoy ]
   * Fix “Unescaped left brace in regex” warnings in dh_haskell_blurbs.
 
+  [ Sean Whitton ]
+  * Respect user's debian/libghc-*-doc.links.  (Closes: #823689)
+    Call dh_link rather than just overwriting debian/libghc-*-doc.links.
+
  -- James McCoy <james...@debian.org>  Sun, 01 May 2016 11:01:02 -0400
 
 haskell-devscripts (0.10.2.3) unstable; urgency=medium
-- 
2.8.1

Attachment: signature.asc
Description: PGP signature

Reply via email to