rpms/ghc/F-10 ghc-rpm-macros.ghc,1.1,1.2 ghc.spec,1.50,1.51
Bryan O'Sullivan
bos at fedoraproject.org
Wed Oct 15 03:48:13 UTC 2008
Author: bos
Update of /cvs/extras/rpms/ghc/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32013
Modified Files:
ghc-rpm-macros.ghc ghc.spec
Log Message:
Regenerate the haddock doc index automatically
Index: ghc-rpm-macros.ghc
===================================================================
RCS file: /cvs/extras/rpms/ghc/F-10/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 15 Oct 2008 03:47:42 -0000 1.2
@@ -1,7 +1,7 @@
%cabal %{_bindir}/runhaskell Setup
%cabal_configure \
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir='$compiler/$pkgid'
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{_docdir}/%{hsc_name}/libraries/%{pkg_name} --haddockdir=%{_docdir}/%{hsc_name}/libraries/%{pkg_name} --libsubdir='$compiler/$pkgid'
%cabal_build \
%cabal build \
@@ -17,9 +17,12 @@
%{nil}
%cabal_install \
-%cabal copy --destdir=${RPM_BUILD_ROOT} \
+%cabal copy --destdir=${RPM_BUILD_ROOT} -v \
%{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 \
@@ -55,3 +58,11 @@
[ "$1" = 1 ] && %{pkg_libdir}/register.sh >& /dev/null || : \
%{nil}
+%ghc_reindex_haddock \
+if [ -f %{_bindir}/haddock -a -d %{_docdir}/%{hsc_name}/libraries ]; then \
+cd %{_docdir}/%{hsc_name}/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/F-10/ghc.spec,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- ghc.spec 13 Oct 2008 08:00:50 -0000 1.50
+++ ghc.spec 15 Oct 2008 03:47:42 -0000 1.51
@@ -16,7 +16,7 @@
Name: ghc
Version: 6.8.3
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Glasgow Haskell Compilation system
# See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
ExcludeArch: alpha ppc64
@@ -172,6 +172,14 @@
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
%{_bindir}/hsc2hs-ghc 500
+
+%post doc
+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
if test "$1" = 0; then
update-alternatives --remove runhaskell %{_bindir}/runghc
@@ -199,10 +207,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
+* Tue Oct 14 2008 Bryan O'Sullivan <bos at serpentine.com> 6.8.3-8.fc10
+- Regenerate the haddock doc index automatically
+- Update macros to fit in with this scheme
+
* Mon Oct 13 2008 Jens Petersen <petersen at redhat.com> - 6.8.3-7.fc10
- add selinux file context for unconfined_execmem following darcs package
More information about the scm-commits
mailing list