- add new ghc-doc-index script - forward port ghc-7.4-silence-gen_contents_index.patch - remove /var/lib/rpm-state/ghc/epel9
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
|
Loading…
Reference in new issue