diff --git a/templates/findutils/files/updatedb.cron-daily b/templates/findutils/files/updatedb.cron-daily new file mode 100755 index 00000000000..b457cf81100 --- /dev/null +++ b/templates/findutils/files/updatedb.cron-daily @@ -0,0 +1,10 @@ +#!/bin/sh + +# Update the "locate" database +if [ -x /usr/bin/updatedb ]; then + if [ -f /etc/updatedb.conf ]; then + /usr/bin/updatedb + else + /usr/bin/updatedb -f proc + fi +fi diff --git a/templates/findutils/template b/templates/findutils/template index 0c80d3cd7d9..6fc64e53382 100644 --- a/templates/findutils/template +++ b/templates/findutils/template @@ -1,6 +1,7 @@ # Template file for 'findutils' pkgname=findutils version=4.4.0 +revision=1 distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--localstatedir=/var/lib/locate" @@ -19,4 +20,7 @@ Add_dependency run glibc post_install() { sed -i -e "s|$XBPS_MASTERDIR||g" ${DESTDIR}/usr/bin/updatedb + # Insdtall the cron daily job. + install -D -m755 ${FILESDIR}/updatedb.cron-daily \ + ${DESTDIR}/etc/cron.daily/updatedb }