From db6794dc27508afd7458b1bb8ea989111a97baac Mon Sep 17 00:00:00 2001
From: Cecil <knoppmyth@gmail.com>
Date: Mon, 4 Jul 2011 20:13:06 -0700
Subject: mlocate:Bumped to latest.

---
 abs/core/mlocate/PKGBUILD            | 57 ++++++++++++++++++++----------------
 abs/core/mlocate/mlocate.install     | 11 +------
 abs/core/mlocate/updatedb.conf       |  4 +--
 abs/core/mlocate/updatedb.cron.daily | 23 +++++++++++++--
 4 files changed, 55 insertions(+), 40 deletions(-)

diff --git a/abs/core/mlocate/PKGBUILD b/abs/core/mlocate/PKGBUILD
index 50db92b..62f7864 100644
--- a/abs/core/mlocate/PKGBUILD
+++ b/abs/core/mlocate/PKGBUILD
@@ -1,47 +1,52 @@
-# $Id: PKGBUILD 1939 2008-05-24 00:35:29Z james $
-# Maintainer: James Rayner <iphitus@gmail.com>
+# $Id: PKGBUILD 97017 2010-10-26 01:53:05Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
 # Contributor: lydgate
 
 pkgname=mlocate
-pkgver=0.20
-pkgrel=11
+pkgver=0.23.1
+pkgrel=2
 pkgdesc="Faster merging drop-in for slocate"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
-license=("GPL")
-groups=("base")
+license=('GPL')
 conflicts=('slocate')
 provides=('slocate')
 replaces=('slocate')
-depends=('glibc')
-backup=('etc/updatedb.conf')
+depends=('glibc' 'coreutils' 'sh')
+backup=('etc/updatedb.conf'
+        'etc/cron.daily/updatedb')
 install=mlocate.install
-source=("https://fedorahosted.org/mlocate/attachment/wiki/MlocateDownloads/mlocate-$pkgver.tar.bz2?format=raw" \
-	updatedb.conf updatedb.cron.daily)
+source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
+	updatedb.conf
+	updatedb.cron.daily)
+md5sums=('db48f27fae91c754c46d8046919803c5'
+         'c374ff223f2e07b5e602ba22359f2335'
+         'cde5da81bebad2de556ef2e43d895e13')
+
 build() {
-  cd "$startdir"/src/$pkgname-$pkgver
+  cd $srcdir/$pkgname-$pkgver
 
   # Build!
   sed -i '/^groupname /s/mlocate/locate/' Makefile.in
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
-  make || return 1
+  make
+  make check
+}
 
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  
   # Set up a default updatedb.conf and a daily cronjob
-  install -v -D -m644 ../updatedb.conf "$startdir"/pkg/etc/updatedb.conf
-  install -v -D -m744 ../updatedb.cron.daily "$startdir"/pkg/etc/cron.daily/updatedb
+  install -Dm644 ${srcdir}/updatedb.conf $pkgdir/etc/updatedb.conf
+  install -Dm744 ${srcdir}/updatedb.cron.daily $pkgdir/etc/cron.daily/updatedb
 
   # Install Mlocate
-  make DESTDIR="$startdir"/pkg install
+  make DESTDIR=$pkgdir install
 
-  cd "$startdir"/pkg
-  ln -sv locate usr/bin/slocate
-  chgrp -v 21 usr/bin/locate
-  chmod -v 2755 usr/bin/locate
+  ln -sv locate $pkgdir/usr/bin/slocate
+  chgrp -v 21 $pkgdir/usr/bin/locate
+  chmod -v 2755 $pkgdir/usr/bin/locate
 
-  mkdir -pv var/lib
-  install -d -m750 -g21 var/lib/locate
+  install -dm755 $pkgdir/var/lib
+  install -d -m750 -g21 $pkgdir/var/lib/locate
 }
-
-md5sums=('ad5e4eb1f2aecf1a5af9fe36c6e297f4'
-         '08f642828fe8a6a0c8e5059133c9a9e2'
-         'eee7f9db8c6145724313af6fd5fe9d66')
diff --git a/abs/core/mlocate/mlocate.install b/abs/core/mlocate/mlocate.install
index d29e4d8..c7b7f9c 100644
--- a/abs/core/mlocate/mlocate.install
+++ b/abs/core/mlocate/mlocate.install
@@ -1,27 +1,18 @@
-# arg 1:  the new package version
 post_install() {
   post_upgrade "$1" "$1"
   echo "mlocate command is technically locate, but slocate is symlinked and still works."
   echo "You should run updatedb as root."
 }
 
-# arg 1:  the new package version
-# arg 2:  the old package version
 post_upgrade() {
   # This can be removed after {m,x}locate have both been updated
   getent group slocate &>/dev/null && usr/sbin/groupdel slocate &>/dev/null
   getent group mlocate &>/dev/null && usr/sbin/groupdel mlocate &>/dev/null
 
-  getent group locate || usr/sbin/groupadd -g 21 locate &>/dev/null
+  getent group locate &>/dev/null || usr/sbin/groupadd -g 21 locate &>/dev/null
   chown -R root:locate var/lib/mlocate
 }
 
-# arg 1:  the old package version
 pre_remove() {
   getent group locate &>/dev/null && usr/sbin/groupdel locate &>/dev/null
 }
-
-op=$1
-shift
-
-$op $*
diff --git a/abs/core/mlocate/updatedb.conf b/abs/core/mlocate/updatedb.conf
index f02fe97..722b042 100644
--- a/abs/core/mlocate/updatedb.conf
+++ b/abs/core/mlocate/updatedb.conf
@@ -1,5 +1,5 @@
 # directories to exclude from the slocate database:
-PRUNEPATHS="/tmp /var/tmp /usr/tmp /var/spool /var/cache"
+PRUNEPATHS="/media /mnt /tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
 
 # filesystems to exclude from the slocate database:
-PRUNEFS="nfs nfs4 smbfs cifs ncpfs afs proc autofs auto iso9660 coda ftpfs sshfs shfs"
+PRUNEFS="afs auto autofs binfmt_misc cifs coda configfs cramfs debugfs devpts devtmpfs ftpfs iso9660 mqueue ncpfs nfs nfs4 proc ramfs securityfs shfs smbfs sshfs sysfs tmpfs udf usbfs vboxsf"
diff --git a/abs/core/mlocate/updatedb.cron.daily b/abs/core/mlocate/updatedb.cron.daily
index b457cf8..cac9bb0 100755
--- a/abs/core/mlocate/updatedb.cron.daily
+++ b/abs/core/mlocate/updatedb.cron.daily
@@ -1,10 +1,29 @@
 #!/bin/sh
 
+# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
+NICE=19
+
+# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
+IONICE_CLASS=2
+
+# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
+IONICE_PRIORITY=7
+
+UPDATEDB="/usr/bin/updatedb"
+
+if [ -x /usr/bin/nice ]; then
+  UPDATEDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEDB}"
+fi
+
+if [ -x /usr/bin/ionice ]; then
+  UPDATEDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEDB}"
+fi
+
 # Update the "locate" database
 if [ -x /usr/bin/updatedb ]; then
   if [ -f /etc/updatedb.conf ]; then
-    /usr/bin/updatedb
+    ${UPDATEDB}
   else
-    /usr/bin/updatedb -f proc
+    ${UPDATEDB} -f proc
   fi
 fi
-- 
cgit v0.12