From 9e1bbb32ae25fef6111d95205614a612ed9f70ec Mon Sep 17 00:00:00 2001 From: Michael Hanson Date: Fri, 3 Dec 2010 03:26:25 +0000 Subject: man-db: upgrade --- abs/core/man-db/PKGBUILD | 52 +++++++++++++++++++++++++++++++++++++++ abs/core/man-db/convert-mans | 11 +++++++++ abs/core/man-db/man-db.cron.daily | 39 +++++++++++++++++++++++++++++ abs/core/man-db/man-db.install | 18 ++++++++++++++ abs/core/man/PKGBUILD | 31 ----------------------- abs/core/man/man-troff.patch | 16 ------------ abs/core/man/whatis.cron.daily | 9 ------- 7 files changed, 120 insertions(+), 56 deletions(-) create mode 100644 abs/core/man-db/PKGBUILD create mode 100644 abs/core/man-db/convert-mans create mode 100755 abs/core/man-db/man-db.cron.daily create mode 100644 abs/core/man-db/man-db.install delete mode 100644 abs/core/man/PKGBUILD delete mode 100644 abs/core/man/man-troff.patch delete mode 100755 abs/core/man/whatis.cron.daily diff --git a/abs/core/man-db/PKGBUILD b/abs/core/man-db/PKGBUILD new file mode 100644 index 0000000..05265fd --- /dev/null +++ b/abs/core/man-db/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 99794 2010-11-17 19:07:22Z andyrtr $ +# Maintainer: Andreas Radke +# Contributor: Sergej Pupykin + +pkgname=man-db +pkgver=2.5.9 +pkgrel=1 +pkgdesc="A utility for reading man pages" +arch=('i686' 'x86_64') +url="http://www.nongnu.org/man-db/" +license=('GPL' 'LGPL') +groups=('base') +depends=( 'bash' 'gdbm' 'zlib' 'groff') +optdepends=('less' 'gzip') +backup=('etc/man_db.conf' + 'etc/cron.daily/man-db') +conflicts=('man') +provides=('man') +replaces=('man') +install=${pkgname}.install +source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.gz + #http://launchpad.net/man-db/main/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz + convert-mans man-db.cron.daily) +md5sums=('9841394f5c5fe7e2dd2e0c5fb4766d0f' + '2b7662a7d5b33fe91f9f3e034361a2f6' + 'd30c39ae47560304471b5461719e0f03') +options=('!libtool') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \ + --with-db=gdbm --disable-setuid --enable-mandirs=GNU \ + --with-sections="1 n l 8 3 0 2 5 4 9 6 7" + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install || return 1 + + # part of groff pkg + rm -f ${pkgdir}/usr/bin/zsoelim + + # script from LFS to convert manpages, see + # 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 +} + diff --git a/abs/core/man-db/convert-mans b/abs/core/man-db/convert-mans new file mode 100644 index 0000000..58a0224 --- /dev/null +++ b/abs/core/man-db/convert-mans @@ -0,0 +1,11 @@ +#!/bin/sh -e +FROM="$1" +TO="$2" +shift ; shift +while [ $# -gt 0 ] +do + FILE="$1" + shift + iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv + mv .tmp.iconv "$FILE" +done diff --git a/abs/core/man-db/man-db.cron.daily b/abs/core/man-db/man-db.cron.daily new file mode 100755 index 0000000..53e66e1 --- /dev/null +++ b/abs/core/man-db/man-db.cron.daily @@ -0,0 +1,39 @@ +#!/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/sbin/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/abs/core/man-db/man-db.install b/abs/core/man-db/man-db.install new file mode 100644 index 0000000..6a0f36b --- /dev/null +++ b/abs/core/man-db/man-db.install @@ -0,0 +1,18 @@ +post_install() { + echo "it's recommended to create an initial" + echo "database running as root:" + echo "\"/usr/bin/mandb --quiet\"" +} + +post_upgrade() { + if [ "`vercmp $2 2.5.3-2`" -lt 0 ]; then + echo "systemuser \"man\" is no more required" + echo "run \"userdel man\". please also" + echo "chown root:root /var/cache/man" + fi +} + +post_remove() { + rm -rf /var/cache/man +} + diff --git a/abs/core/man/PKGBUILD b/abs/core/man/PKGBUILD deleted file mode 100644 index 6cb2bf0..0000000 --- a/abs/core/man/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $ -# Maintainer: judd -pkgname=man -pkgver=1.6f -pkgrel=11 -pkgdesc="A utility for reading man pages" -arch=('i686' 'x86_64') -url="http://primates.ximian.com/~flucifredi/man/" -license=('GPL') -groups=('base') -depends=('groff' 'less' 'gzip' 'awk' 'coreutils' 'sh' 'diffutils') -backup=(etc/man.conf) -source=(http://primates.ximian.com/~flucifredi/man/man-$pkgver.tar.gz \ - whatis.cron.daily man-troff.patch) -md5sums=('67aaaa6df35215e812fd7d89472c44b6' - 'b86a5f2dd87c6be30421a8813547229d' - '21541cb3073259f7fb9335675ca41b0e') -options=(!emptydirs) - -build() { - cd $startdir/src/$pkgname-$pkgver - patch -Np1 -i ../man-troff.patch || return 1 - ./configure -confdir='/etc' -d +lang all -mandir=/usr/share/man - make || return 1 - make PREFIX=$startdir/pkg install || return 1 - - sed -i "s|-Tlatin1||g" $startdir/pkg/etc/man.conf - - #install whatis cron script - install -D -m744 ../whatis.cron.daily $startdir/pkg/etc/cron.daily/whatis -} diff --git a/abs/core/man/man-troff.patch b/abs/core/man/man-troff.patch deleted file mode 100644 index e08e931..0000000 --- a/abs/core/man/man-troff.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur man-1.5p-orig/src/man.conf.in man-1.5p/src/man.conf.in ---- man-1.5p-orig/src/man.conf.in 2005-01-08 10:50:45.000000000 -0800 -+++ man-1.5p/src/man.conf.in 2005-03-18 13:22:17.000000000 -0800 -@@ -88,9 +88,9 @@ - # If you have a new troff (version 1.18.1?) and its colored output - # causes problems, add the -c option to TROFF, NROFF, JNROFF. - # --TROFF @troff@ --NROFF @nroff@ --JNROFF @jnroff@ -+TROFF @troff@ -c -+NROFF @nroff@ -c -+JNROFF @jnroff@ -c - EQN @eqn@ - NEQN @neqn@ - JNEQN @jneqn@ diff --git a/abs/core/man/whatis.cron.daily b/abs/core/man/whatis.cron.daily deleted file mode 100755 index 6332d80..0000000 --- a/abs/core/man/whatis.cron.daily +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Make sure MANPATH is complete -source /etc/profile -source /etc/profile.d/* 2>/dev/null - -# Update the "whatis" database -/usr/sbin/makewhatis -u -w - -- cgit v0.12