[PATCH 02/11] Fix a bash error - single quote prevents expansion of shell variables (fixed linebreaks)
---
hlibrary.mk | 2 +-
hlibrary.mk.orig | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hlibrary.mk b/hlibrary.mk
index fb91ca5..5408863 100644
--- a/hlibrary.mk
+++ b/hlibrary.mk
@@ -175,7 +175,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
$(if $(HASKELL_HIDE_PACKAGES),sed -i 's/^exposed: True$$/exposed: False/' $$pkg_config;) \
install -Dm 644 $$pkg_config debian/$(notdir $@)/var/lib/ghc/package.conf.d/$$pkg_config; \
rm -f $$pkg_config
- if [ 'z$(DEB_GHC_EXTRA_PACKAGES)' != 'z' ] ; then \
+ if [ "z$(DEB_GHC_EXTRA_PACKAGES)" != "z" ] ; then \
mkdir -p debian/$(notdir $@)/usr/lib/haskell-packages/extra-packages; \
echo '$(DEB_GHC_EXTRA_PACKAGES)' > debian/$(notdir $@)/usr/lib/haskell-packages/extra-packages/$(CABAL_PACKAGE)-$(CABAL_VERSION) ; \
fi
diff --git a/hlibrary.mk.orig b/hlibrary.mk.orig
index b7f046b..fb91ca5 100644
--- a/hlibrary.mk.orig
+++ b/hlibrary.mk.orig
@@ -145,7 +145,8 @@ endif
build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp
build-haddock-stamp:
- [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock --builddir=dist-ghc $(DEB_HADDOCK_OPTS)
+ [ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock --builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+ echo "Haddock failed (no modules?), creating empty documentation package."
touch build-haddock-stamp
build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp
@@ -167,7 +168,7 @@ debian/extra-depends: debian/tmp-inst-ghc
DEB_LINTIAN_OVERRIDES_FILE = debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides
install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
- cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+ cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; find usr/lib/haskell-packages/ghc/lib/ \
\( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \
@@ -186,7 +187,7 @@ install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
dh_haskell_shlibdeps -p$(notdir $@)
install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends
- cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+ cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; find usr/lib/haskell-packages/ghc/lib/ \
! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
dh_haskell_provides -p$(notdir $@)
--
1.9.1
Reply to: