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 - 0.14.2-1 +- test for HsColour directly when running "cabal haddock" instead of + checking for without_haddock + * Sat Nov 12 2011 Jens Petersen - 0.14.1-1 - fix double listing of docdir in base lib package