Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
# Source0-md5: -
URL: http://hackage.haskell.org/package/%{pkgname}/
-BuildRequires: ghc
+BuildRequires: ghc >= 6.10
#BuildRequires: ghc-OTHERMODULE
%requires_eq ghc
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
rm -rf $RPM_BUILD_ROOT
runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
+# work around automatic haddock docs installation
+rm -rf %{name}-%{version}/html
+mkdir %{name}-%{version}
+cp -a $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/html %{name}-%{version}/
+
runhaskell Setup.hs register \
--gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{libsubdir}/%{pkgname}.conf
%files
%defattr(644,root,root,755)
%doc NEWS
-%doc %{_defaultdocdir}/%{name}-%{version}/html
+%doc %{name}-%{version}/html
%{_libdir}/%{libsubdir}