[ghc-rpm-macros/f14] test for HsColour directly in "cabal haddock" instead of using without_haddock

Jens Petersen petersen at fedoraproject.org
Thu Nov 17 07:48:02 UTC 2011


commit 69c80c6b4260934bc5d9338280ff44711add49f3
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Nov 17 16:47:51 2011 +0900

    test for HsColour directly in "cabal haddock" instead of using without_haddock

 ghc-rpm-macros.ghc  |    4 +++-
 ghc-rpm-macros.spec |    6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 9427fee..1ad808b 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -188,7 +188,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
 %{?1:cd %1-%2}\
 %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
 %cabal build\
-%{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\
+%if %{undefined without_haddock}\
+%cabal haddock $(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)\
+%endif\
 %{?1:cd -}\
 %{nil}
 
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 6d5b4f4..07af3b6 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -3,7 +3,7 @@
 %global macros_file %{_sysconfdir}/rpm/macros.ghc
 
 Name:           ghc-rpm-macros
-Version:        0.10.60
+Version:        0.10.61
 Release:        1%{?dist}
 Summary:        Macros for building packages for GHC
 
@@ -60,6 +60,10 @@ EOF
 
 
 %changelog
+* Thu Nov 17 2011 Jens Petersen <petersen at redhat.com> - 0.10.61-1
+- test for HsColour directly when running "cabal haddock" instead of
+  checking for without_haddock
+
 * Fri Sep 30 2011 Jens Petersen <petersen at redhat.com> - 0.10.60-1
 - fix devel subpackage's prof and doc obsoletes and provides versions
   for multiple lib packages like ghc (reported by Henrik Nordström)


More information about the scm-commits mailing list