From 94c9995cb71c98fbc0f3c4c2a098bceee8932417 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 28 Mar 2009 18:52:00 +0100 Subject: [PATCH] man-db: add a daily cron job to rebuild manpages cache. --HG-- extra : convert_revision : 87e1ba47ca266f9a0510d38f94927815bf33da79 --- templates/man-db/files/man-db.cron-daily | 17 +++++++++++++++++ templates/man-db/template | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100755 templates/man-db/files/man-db.cron-daily diff --git a/templates/man-db/files/man-db.cron-daily b/templates/man-db/files/man-db.cron-daily new file mode 100755 index 00000000000..6953b76560f --- /dev/null +++ b/templates/man-db/files/man-db.cron-daily @@ -0,0 +1,17 @@ +#!/bin/sh + +# taken from Debian +# man-db cron daily +set -e + +if ! [ -d /var/cache/man ]; then + # Recover from deletion, per FHS. + mkdir -p /var/cache/man + chmod 755 /var/cache/man +fi + +# regenerate man database +/usr/bin/mandb --quiet + +exit 0 + diff --git a/templates/man-db/template b/templates/man-db/template index d6e2e29a759..b617d90cdc1 100644 --- a/templates/man-db/template +++ b/templates/man-db/template @@ -1,6 +1,7 @@ # Template file for 'man-db' pkgname=man-db version=2.5.4 +revision=1 distfiles="${NONGNU_SITE}/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--with-db=gdbm --with-pager=less --with-gzip=/usr/bin/gzip @@ -24,3 +25,10 @@ Add_dependency full gdbm Add_dependency full groff Add_dependency full grep Add_dependency full lzma-utils + +post_install() +{ + # Install the cron daily job. + install -D -m755 ${FILESDIR}/mann-db.cron-daily \ + ${DESTDIR}/etc/cron.daily/man-db +}