rpms/ghc/devel ghc-rpm-macros.ghc,1.1,1.2 ghc.spec,1.49,1.50

Bryan O'Sullivan bos at fedoraproject.org
Tue Oct 14 18:55:58 UTC 2008


Author: bos

Update of /cvs/extras/rpms/ghc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10086

Modified Files:
	ghc-rpm-macros.ghc ghc.spec 
Log Message:
Generate haddocks after installing ghc-doc



Index: ghc-rpm-macros.ghc
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc-rpm-macros.ghc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ghc-rpm-macros.ghc	17 Sep 2008 06:00:51 -0000	1.1
+++ ghc-rpm-macros.ghc	14 Oct 2008 18:55:26 -0000	1.2
@@ -55,3 +55,11 @@
 [ "$1" = 1 ] && %{pkg_libdir}/register.sh >& /dev/null || : \
 %{nil}
 
+%ghc_haddock_reindex \
+if [ -f /usr/bin/haddock -a -d /usr/share/doc/ghc/libraries ]; then \
+cd /usr/share/doc/ghc/libraries && \
+haddock --gen-index --gen-contents -o . -t 'Haskell Hierarchical Libraries' \
+$(find . \( \( -path ./ghc -o -path ./ghc-prim \) -prune \) -o \( -name '*.haddock' -print \) \
+| sed 's!.*/\([^/]*\).haddock!--read-interface=\1,\0!'); \
+fi \
+%{nil}


Index: ghc.spec
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- ghc.spec	13 Oct 2008 05:20:47 -0000	1.49
+++ ghc.spec	14 Oct 2008 18:55:27 -0000	1.50
@@ -16,7 +16,7 @@
 
 Name:		ghc
 Version:	6.10.0.20081007
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Glasgow Haskell Compilation system
 # See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
 ExcludeArch:	alpha ppc64
@@ -168,6 +168,11 @@
 update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
   %{_bindir}/hsc2hs-ghc 500
 
+
+%post doc
+%ghc_haddock_reindex
+
+
 %preun
 if test "$1" = 0; then
   update-alternatives --remove runhaskell %{_bindir}/runghc
@@ -195,10 +200,21 @@
 %files doc
 %defattr(-,root,root,-)
 %{_docdir}/%{name}
+%ghost %{_docdir}/%{name}/libraries/doc-index.html
+%ghost %{_docdir}/%{name}/libraries/haddock.css
+%ghost %{_docdir}/%{name}/libraries/haddock-util.js
+%ghost %{_docdir}/%{name}/libraries/haskell_icon.gif
+%ghost %{_docdir}/%{name}/libraries/index.html
+%ghost %{_docdir}/%{name}/libraries/minus.gif
+%ghost %{_docdir}/%{name}/libraries/plus.gif
 %endif
 
 
 %changelog
+* Sun Oct 14 2008 Bryan O'Sullivan <bos at serpentine.com> - 6.10.0.20081007-4
+- Add ghc_haddock_reindex macro
+- Generate haddock index after installing ghc-doc package
+
 * Mon Oct 13 2008 Jens Petersen <petersen at redhat.com> - 6.10.0.20081007-3
 - provide haddock = 2.2.2
 - add selinux file context for unconfined_execmem following darcs package




More information about the scm-commits mailing list