summaryrefslogtreecommitdiff
path: root/testing/mlocate/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/mlocate/PKGBUILD')
-rw-r--r--testing/mlocate/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/mlocate/PKGBUILD b/testing/mlocate/PKGBUILD
new file mode 100644
index 000000000..50a15650f
--- /dev/null
+++ b/testing/mlocate/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 162087 2012-06-19 15:29:24Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: lydgate
+
+pkgname=mlocate
+pkgver=0.25
+pkgrel=2
+pkgdesc="Faster merging drop-in for slocate"
+arch=('i686' 'x86_64')
+url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
+license=('GPL')
+depends=('glibc' 'coreutils' 'sh')
+backup=('etc/updatedb.conf'
+ 'etc/cron.daily/updatedb')
+source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
+ updatedb.conf
+ updatedb.cron.daily)
+md5sums=('c6d043b170613b0e327a815b497f680a'
+ 'b56d81de17fe29b01b4b28861acb8fd4'
+ 'cde5da81bebad2de556ef2e43d895e13')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ sed -i '/^groupname /s/mlocate/locate/' Makefile.in
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
+ make
+
+}
+
+check() {
+ cd $srcdir/$pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make DESTDIR=$pkgdir install
+
+ ln -s locate $pkgdir/usr/bin/slocate
+ chgrp 21 $pkgdir/usr/bin/locate
+ chmod 2755 $pkgdir/usr/bin/locate
+
+ install -dm755 $pkgdir/var/lib
+ install -dm750 -g21 $pkgdir/var/lib/locate
+
+ # Set up a default updatedb.conf and a daily cronjob
+ install -Dm644 ${srcdir}/updatedb.conf $pkgdir/etc/updatedb.conf
+ install -Dm744 ${srcdir}/updatedb.cron.daily $pkgdir/etc/cron.daily/updatedb
+}