summaryrefslogtreecommitdiff
path: root/core/man-db
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-04-16 03:47:45 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-04-16 03:47:45 +0000
commitc78a18750fc2b9df6ea94089159f4176a1f9198d (patch)
tree25be357ee503ee66fd716327dd1a9a42d5f8b235 /core/man-db
parentad45d1982b97faa9372d99e51daa687c7c09de7d (diff)
Wed Apr 16 03:42:20 UTC 2014
Diffstat (limited to 'core/man-db')
-rw-r--r--core/man-db/PKGBUILD25
-rwxr-xr-xcore/man-db/man-db.cron.daily39
-rw-r--r--core/man-db/man-db.service11
-rw-r--r--core/man-db/man-db.timer7
4 files changed, 32 insertions, 50 deletions
diff --git a/core/man-db/PKGBUILD b/core/man-db/PKGBUILD
index 89ee632db..bfb1321b1 100644
--- a/core/man-db/PKGBUILD
+++ b/core/man-db/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 204740 2014-01-26 11:28:37Z andyrtr $
+# $Id: PKGBUILD 210567 2014-04-14 22:17:29Z thomas $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
pkgname=man-db
-pkgver=2.6.6
+pkgver=2.6.7.1
pkgrel=1
pkgdesc="A utility for reading man pages"
arch=('i686' 'x86_64')
@@ -12,18 +12,19 @@ license=('GPL' 'LGPL')
groups=('base')
depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less')
optdepends=('gzip')
-backup=('etc/man_db.conf'
- 'etc/cron.daily/man-db')
+backup=('etc/man_db.conf')
conflicts=('man')
provides=('man')
replaces=('man')
install=${pkgname}.install
-source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.sig}
- convert-mans man-db.cron.daily)
-md5sums=('5d65d66191080c144437a6c854e17868'
+source=(http://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig}
+ convert-mans
+ man-db.{timer,service})
+md5sums=('ce7b697f8e8016a085d9f5975ae6c4fb'
'SKIP'
'2b7662a7d5b33fe91f9f3e034361a2f6'
- '934fd047fecb915038bf4bf844ea609c')
+ 'df6d4f432e3e16c255c785fca1447346'
+ '36fb3f616e42a0e23cf7a4d284e640cd')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -54,7 +55,9 @@ package() {
# http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
- #install whatis cron script
- install -D -m744 ${srcdir}/man-db.cron.daily ${pkgdir}/etc/cron.daily/man-db
+ # install man-db update timer
+ install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
+ install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
}
-
diff --git a/core/man-db/man-db.cron.daily b/core/man-db/man-db.cron.daily
deleted file mode 100755
index 9b4abd894..000000000
--- a/core/man-db/man-db.cron.daily
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/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
-
-UPDATEMANDB="/usr/bin/mandb --quiet"
-
-# Update the "whatis" database
-#/usr/bin/makewhatis -u -w
-
-# taken from Debian
-# man-db cron daily
-set -e
-
-if ! [ -d /var/cache/man ]; then
- # Recover from deletion, per FHS.
- mkdir -p /var/cache/man
- chmod 755 /var/cache/man
-fi
-
-# regenerate man database
-
-if [ -x /usr/bin/nice ]; then
- UPDATEMANDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEMANDB}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- UPDATEMANDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEMANDB}"
-fi
-
-${UPDATEMANDB}
-
-exit 0
diff --git a/core/man-db/man-db.service b/core/man-db/man-db.service
new file mode 100644
index 000000000..be4619c4d
--- /dev/null
+++ b/core/man-db/man-db.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mkdir -m 0755 -p /var/cache/man
+ExecStart=/usr/bin/mandb --quiet
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/man-db/man-db.timer b/core/man-db/man-db.timer
new file mode 100644
index 000000000..5d950f0e8
--- /dev/null
+++ b/core/man-db/man-db.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true