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 +}