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

Jens Petersen petersen at fedoraproject.org
Thu Nov 17 05:37:05 UTC 2011


commit d32b4577e834f8712be25c46b475d6c066fd5c99
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Nov 17 14:36:50 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 2d6acbd..f13bc63 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -183,7 +183,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 d951b61..0220290 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.14.1
+Version:        0.14.2
 Release:        1%{?dist}
 Summary:        Macros for building packages for GHC
 
@@ -59,6 +59,10 @@ EOF
 
 
 %changelog
+* Thu Nov 17 2011 Jens Petersen <petersen at redhat.com> - 0.14.2-1
+- test for HsColour directly when running "cabal haddock" instead of
+  checking for without_haddock
+
 * Sat Nov 12 2011 Jens Petersen <petersen at redhat.com> - 0.14.1-1
 - fix double listing of docdir in base lib package
 


More information about the scm-commits mailing list