revert rpm-state and bring back ghc-doc-index cronjob in ghc-doc-index subpackage

- add new ghc-doc-index script
- forward port ghc-7.4-silence-gen_contents_index.patch
- remove /var/lib/rpm-state/ghc/
epel9
Jens Petersen 12 years ago
parent b2f2d6c05a
commit 1456df9b18

@ -0,0 +1,11 @@
--- ghc-7.4.1/libraries/gen_contents_index~ 2012-09-30 16:14:39.368295240 +0900
+++ ghc-7.4.1/libraries/gen_contents_index 2012-10-30 19:12:10.017398594 +0900
@@ -50,7 +50,7 @@
esac
# Now create the combined contents and index pages
-echo $HADDOCK_ARGS
+#echo $HADDOCK_ARGS
$HADDOCK --gen-index --gen-contents -o . \
-t "Haskell Hierarchical Libraries" \
-p "prologue.txt" \

@ -0,0 +1,33 @@
#!/bin/sh
LOCKFILE=/var/lock/ghc-doc-index.lock
# the lockfile is not meant to be perfect, it's just in case
# two cron scripts get run close to each other to keep
# them from stepping on each other's toes.
if [ -f $LOCKFILE ]; then
echo "Locked with $LOCKFILE"
exit 0
fi
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
touch $LOCKFILE
PKGDIRCACHE=/var/lib/ghc/pkg-dir.cache
LISTING="env LANG=C ls -dl"
# only re-index ghc docs when there are changes
cd /usr/share/doc/ghc/html/libraries
if [ -r "$PKGDIRCACHE" ]; then
$LISTING */ > $PKGDIRCACHE.new
DIR_DIFF=$(diff $PKGDIRCACHE $PKGDIRCACHE.new)
else
$LISTING */ > $PKGDIRCACHE
fi
if [ -x "gen_contents_index" -a ! -r "$PKGDIRCACHE.new" -o -n "$DIR_DIFF" ]; then
./gen_contents_index
fi
if [ -f $PKGDIRCACHE.new ]; then
mv -f $PKGDIRCACHE{.new,}
fi

@ -0,0 +1,13 @@
#! /bin/bash
if [ -e /etc/sysconfig/ghc-doc-index ]; then
. /etc/sysconfig/ghc-doc-index
fi
if [ "$CRON" = "no" ]; then
exit 0
fi
/usr/bin/ghc-doc-index >/dev/null
exit 0

@ -40,6 +40,8 @@ Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
%if %{undefined without_testsuite} %if %{undefined without_testsuite}
Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.bz2 Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.bz2
%endif %endif
Source3: ghc-doc-index.cron
Source4: ghc-doc-index
URL: http://haskell.org/ghc/ URL: http://haskell.org/ghc/
Obsoletes: ghc-dph-base < 0.5, ghc-dph-base-devel < 0.5, ghc-dph-base-prof < 0.5 Obsoletes: ghc-dph-base < 0.5, ghc-dph-base-devel < 0.5, ghc-dph-base-prof < 0.5
Obsoletes: ghc-dph-par < 0.5, ghc-dph-par-devel < 0.5, ghc-dph-par-prof < 0.5 Obsoletes: ghc-dph-par < 0.5, ghc-dph-par-devel < 0.5, ghc-dph-par-prof < 0.5
@ -75,6 +77,7 @@ BuildRequires: llvm >= 3.0
BuildRequires: autoconf BuildRequires: autoconf
%endif %endif
Requires: ghc-compiler = %{version}-%{release} Requires: ghc-compiler = %{version}-%{release}
Requires: ghc-doc-index = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release} Requires: ghc-libraries = %{version}-%{release}
Requires: ghc-ghc-devel = %{version}-%{release} Requires: ghc-ghc-devel = %{version}-%{release}
# absolute haddock path (was for html/libraries -> libraries) # absolute haddock path (was for html/libraries -> libraries)
@ -94,6 +97,7 @@ Patch10: ghc-wrapper-libffi-include.patch
Patch11: ghc-7.4-add-support-for-ARM-hard-float-ABI-fixes-5914.patch Patch11: ghc-7.4-add-support-for-ARM-hard-float-ABI-fixes-5914.patch
# disable building HS*.o libs for ghci # disable building HS*.o libs for ghci
Patch12: ghc-7.4.2-Cabal-disable-ghci-libs.patch Patch12: ghc-7.4.2-Cabal-disable-ghci-libs.patch
Patch17: ghc-7.4-silence-gen_contents_index.patch
%description %description
GHC is a state-of-the-art, open source, compiler and interactive environment GHC is a state-of-the-art, open source, compiler and interactive environment
@ -195,8 +199,11 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
%prep %prep
%setup -q -n %{name}-%{version} %{!?without_testsuite:-b2} %setup -q -n %{name}-%{version} %{!?without_testsuite:-b2}
# tweaks to gen_contents_index
%patch1 -p1 -b .orig %patch1 -p1 -b .orig
%patch2 -p1 %patch2 -p1
%patch17 -p1
# make sure we don't use these # make sure we don't use these
rm -r ghc-tarballs/{mingw,perl} rm -r ghc-tarballs/{mingw,perl}
@ -292,10 +299,11 @@ done
%ghc_strip_dynlinked %ghc_strip_dynlinked
%if %{undefined without_haddock} %if %{undefined without_haddock}
mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/ghc mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly
install -p --mode=755 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/ghc-doc-index
mkdir -p %{buildroot}%{_localstatedir}/lib/ghc
%endif %endif
%check %check
# stolen from ghc6/debian/rules: # stolen from ghc6/debian/rules:
# Do some very simple tests that the compiler actually works # Do some very simple tests that the compiler actually works
@ -351,6 +359,7 @@ fi
%doc ANNOUNCE HACKING LICENSE README %doc ANNOUNCE HACKING LICENSE README
%{_bindir}/ghc %{_bindir}/ghc
%{_bindir}/ghc-%{version} %{_bindir}/ghc-%{version}
%{_bindir}/ghc-doc-index
%{_bindir}/ghc-pkg %{_bindir}/ghc-pkg
%{_bindir}/ghc-pkg-%{version} %{_bindir}/ghc-pkg-%{version}
%{_bindir}/ghci %{_bindir}/ghci
@ -404,7 +413,12 @@ fi
%ghost %{ghcdocbasedir}/libraries/index*.html %ghost %{ghcdocbasedir}/libraries/index*.html
%ghost %{ghcdocbasedir}/libraries/minus.gif %ghost %{ghcdocbasedir}/libraries/minus.gif
%ghost %{ghcdocbasedir}/libraries/plus.gif %ghost %{ghcdocbasedir}/libraries/plus.gif
%{_localstatedir}/lib/rpm-state/ghc %{_localstatedir}/lib/ghc
%endif
%if %{undefined without_haddock}
%files doc-index
%{_sysconfdir}/cron.hourly/ghc-doc-index
%endif %endif
%files libraries %files libraries
@ -418,12 +432,11 @@ fi
- use Karel Gardas' ARM hardfloat patch committed upstream - use Karel Gardas' ARM hardfloat patch committed upstream
- use _smp_mflags again - use _smp_mflags again
- disable Cabal building ghci lib files - disable Cabal building ghci lib files
- silence the doc re-indexing script and move the doc indexing cronjob
to a new ghc-doc-index subpackage (#870694)
- do not disable hscolour in build.mk - do not disable hscolour in build.mk
- drop the explicit hscolour BR - drop the explicit hscolour BR
- without_hscolour should now be set by ghc-rpm-macros for bootstrapping - without_hscolour should now be set by ghc-rpm-macros for bootstrapping
- drop cronjob for re-indexing html docs and add a rpm-state dir for
sharing state between devel posttrans scripts (#870694)
(http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets)
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.1-6 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

Loading…
Cancel
Save