diff --git a/ghc-HUnit.spec b/ghc-HUnit.spec index e2bd5eb..a95bb27 100644 --- a/ghc-HUnit.spec +++ b/ghc-HUnit.spec @@ -2,10 +2,12 @@ %global pkg_name HUnit +%bcond_without tests + Name: ghc-%{pkg_name} # part of haskell-platform Version: 1.2.5.2 -Release: 31%{?dist} +Release: 32%{?dist} Summary: Unit testing framework for Haskell License: BSD @@ -42,10 +44,6 @@ This package provides the Haskell %{pkg_name} library development files. %ghc_lib_build -%check -%cabal test - - %install %ghc_lib_install @@ -53,6 +51,18 @@ This package provides the Haskell %{pkg_name} library development files. rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/{README,doc/Guide.html,examples/Example.hs,prologue.txt} +%check +%if %{with tests} +mv HUnit.cabal HUnit.cabal.orig +mv HUnit.cabal.tests HUnit.cabal +cabal_configure_extra_options=--enable-tests +%ghc_bin_build +%cabal test +mv HUnit.cabal HUnit.cabal.tests +mv HUnit.cabal.orig HUnit.cabal +%endif + + %post devel %ghc_pkg_recache @@ -70,6 +80,9 @@ rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/{README,doc/Guide.html,example %changelog +* Fri May 16 2014 Jens Petersen - 1.2.5.2-32 +- enable tests + * Mon Feb 24 2014 Jens Petersen - 1.2.5.2-31 - split out of haskell-platform