From c13aaea995fd140413c44f387dd9a76b2dee8266 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 18:03:52 +0000 Subject: [PATCH] don't run cabal haddock for meta libraries --- ghc-rpm-macros.spec | 1 + macros.ghc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1650a9c..427d38c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -101,6 +101,7 @@ EOF * Sat Jan 31 2015 Jens Petersen - 1.4.6-1 - disable Cabal tests on armv7 since they give an internal error https://ghc.haskell.org/trac/ghc/ticket/10029 +- only run cabal haddock for real libraries with modules * Sat Jan 31 2015 Jens Petersen - 1.4.5-1 - fix the R*PATH regexp diff --git a/macros.ghc b/macros.ghc index ad9a3f4..1936274 100644 --- a/macros.ghc +++ b/macros.ghc @@ -106,7 +106,11 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\ %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ +fi\ %endif\ %{nil}