]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - ghc-package.spec
- require ghc with haddock
[projects/template-specs.git] / ghc-package.spec
index 0d6093c5cdc5ddf4b9d9c8b5743692f0ca6fb7c9..3c889465602faf083dad7d5af2fcf10f8734d3dc 100644 (file)
@@ -1,6 +1,3 @@
-#
-# This templete is ghc-centric, so full package name should be ghc-MODULE.spec
-#
 %define        pkgname NAME
 Summary:       -
 Name:          ghc-%{pkgname}
@@ -11,12 +8,9 @@ Group:                Development/Languages
 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-binary
-#BuildRequires:        ghc-dataenc
-#BuildRequires:        ghc-mmap
-#BuildRequires:        ghc-zlib
-ExclusiveArch: %{ix86} %{x8664}
+BuildRequires: ghc >= 6.10
+#BuildRequires:        ghc-OTHERMODULE
+%requires_eq   ghc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                libsubdir       ghc-%(/usr/bin/ghc --numeric-version)/%{pkgname}-%{version}
@@ -41,6 +35,11 @@ runhaskell Setup.hs haddock --executables
 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
 
@@ -58,5 +57,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc NEWS
-%doc %{_defaultdocdir}/%{name}-%{version}/html
+%doc %{name}-%{version}/html
 %{_libdir}/%{libsubdir}
This page took 0.911005 seconds and 4 git commands to generate.