diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-16 03:47:45 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-16 03:47:45 +0000 |
commit | c78a18750fc2b9df6ea94089159f4176a1f9198d (patch) | |
tree | 25be357ee503ee66fd716327dd1a9a42d5f8b235 /core/mlocate | |
parent | ad45d1982b97faa9372d99e51daa687c7c09de7d (diff) |
Wed Apr 16 03:42:20 UTC 2014
Diffstat (limited to 'core/mlocate')
-rw-r--r-- | core/mlocate/PKGBUILD | 26 | ||||
-rwxr-xr-x | core/mlocate/updatedb.cron | 6 | ||||
-rw-r--r-- | core/mlocate/updatedb.service | 9 | ||||
-rw-r--r-- | core/mlocate/updatedb.timer | 7 |
4 files changed, 33 insertions, 15 deletions
diff --git a/core/mlocate/PKGBUILD b/core/mlocate/PKGBUILD index c8d979f9a..b46a7afdb 100644 --- a/core/mlocate/PKGBUILD +++ b/core/mlocate/PKGBUILD @@ -1,28 +1,32 @@ -# $Id: PKGBUILD 166971 2012-09-23 22:22:21Z bisson $ +# $Id: PKGBUILD 210562 2014-04-14 22:14:39Z thomas $ # Maintainer: Gaetan Bisson <bisson@archlinux.org> # Contributor: Allan McRae <allan@archlinux.org> # Contributor: lydgate pkgname=mlocate pkgver=0.26 -pkgrel=1 +pkgrel=3 pkgdesc='Merging locate/updatedb implementation' url='https://fedorahosted.org/mlocate/' arch=('i686' 'x86_64') license=('GPL') -backup=('etc/updatedb.conf' - 'etc/cron.daily/updatedb') +backup=('etc/updatedb.conf') +depends=('glibc') source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-${pkgver}.tar.xz" 'updatedb.conf' - 'updatedb.cron') + updatedb.{timer,service}) sha1sums=('c6e6d81b25359c51c545f4b8ba0f3b469227fcbc' '0150379149bf9d714bc81332d775fc273e7e3535' - '8301e6277d27db539af6cf4bc243e8e247bffc2e') + '2f3a94994ece62aeb286315a6fa5e9e03203706a' + 'f2f71aefbf677fb1719b5c67c757cde34e3210d7') -build() { +prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - sed -i '/^groupname /s/mlocate/locate/' Makefile.in +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib make } @@ -45,5 +49,9 @@ package() { install -dm750 -g21 "${pkgdir}/var/lib/locate" install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf" - install -Dm744 ../updatedb.cron "${pkgdir}/etc/cron.daily/updatedb" + + 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 } diff --git a/core/mlocate/updatedb.cron b/core/mlocate/updatedb.cron deleted file mode 100755 index 431cb533e..000000000 --- a/core/mlocate/updatedb.cron +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -NICE='nice -n 19' -IONICE='ionice -c 2 -n 7' - -exec ${IONICE} ${NICE} updatedb -f proc diff --git a/core/mlocate/updatedb.service b/core/mlocate/updatedb.service new file mode 100644 index 000000000..f02edace9 --- /dev/null +++ b/core/mlocate/updatedb.service @@ -0,0 +1,9 @@ +[Unit] +Description=Update locate database + +[Service] +Type=oneshot +ExecStart=/usr/bin/updatedb +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 diff --git a/core/mlocate/updatedb.timer b/core/mlocate/updatedb.timer new file mode 100644 index 000000000..c8ca33f35 --- /dev/null +++ b/core/mlocate/updatedb.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Daily locate database update + +[Timer] +OnCalendar=daily +AccuracySec=12h +Persistent=true |