core/mlocate/PKGBUILD
2016-10-28 00:21:03 +01:00

53 lines
1.5 KiB
Bash

pkgname=mlocate
pkgver=0.26
pkgrel=3
pkgdesc="Faster merging drop-in for slocate"
arch=('x86_64')
url='https://fedorahosted.org/mlocate/'
license=('GPL')
depends=('glibc')
backup=('etc/updatedb.conf')
source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz"
'updatedb.conf'
updatedb.{timer,service})
sha1sums=('c6e6d81b25359c51c545f4b8ba0f3b469227fcbc'
'0150379149bf9d714bc81332d775fc273e7e3535'
'2f3a94994ece62aeb286315a6fa5e9e03203706a'
'387185ea34fc65f8457cb40dc374319f0b2490cd')
prepare() {
cd $pkgname-$pkgver
sed -i '/^groupname /s/mlocate/locate/' Makefile.in
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make
}
check() {
cd $pkgname-$pkgver
make check
}
package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
chgrp -v 21 $pkgdir/usr/bin/locate
chmod -v 2755 $pkgdir/usr/bin/locate
ln -sv locate $pkgdir/usr/bin/slocate
install -dm755 $pkgdir/var/lib
install -d -m750 -g21 $pkgdir/var/lib/locate
install -Dm644 ../updatedb.conf $pkgdir/etc/updatedb.conf
install -D -m644 ${srcdir}/updatedb.timer ${pkgdir}/usr/lib/systemd/system/updatedb.timer
install -D -m644 ${srcdir}/updatedb.service ${pkgdir}/usr/lib/systemd/system/updatedb.service
install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
ln -s ../updatedb.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/updatedb.timer
}