Try to fix doc indexing

This commit is contained in:
Bryan O'Sullivan 2008-10-14 21:32:36 +00:00
parent 354d10e225
commit 8a484b3e87
2 changed files with 14 additions and 5 deletions

View File

@ -20,6 +20,9 @@ make -f cabal-rpm.mk %{_smp_mflags} \
%cabal copy --destdir=${RPM_BUILD_ROOT} \
%{nil}
%ghc_cabal_configure \
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/ghc/libraries/%{name} --libsubdir='$compiler/$pkgid'
%ghc_gen_filelists() \
rm -f %1.files %1-prof.files \
echo '%defattr(-,root,root,-)' > %1-prof.files \
@ -56,8 +59,8 @@ install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir} \
%{nil}
%ghc_haddock_reindex \
if [ -f /usr/bin/haddock -a -d /usr/share/doc/ghc/libraries ]; then \
cd /usr/share/doc/ghc/libraries && \
if [ -f %{_bindir}/haddock -a -d %{_docdir}/ghc/libraries ]; then \
cd %{_docdir}/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!'); \

View File

@ -16,7 +16,7 @@
Name: ghc
Version: 6.10.0.20081007
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Glasgow Haskell Compilation system
# See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
ExcludeArch: alpha ppc64
@ -170,7 +170,10 @@ update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
%post doc
%ghc_haddock_reindex
cd %{_docdir}/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!')
%preun
@ -211,7 +214,10 @@ fi
%changelog
* Sun Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.10.0.20081007-4
* Tue Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.10.0.20081007-5
- Don't use a macro to update the docs for the main doc package
* Tue Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.10.0.20081007-4
- Add ghc_haddock_reindex macro
- Generate haddock index after installing ghc-doc package