summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-21 00:01:36 +0000
committerroot <root@rshg054.dnsready.net>2012-06-21 00:01:36 +0000
commit6d22541bcebb7236bedfb98a96d5a1292072e86c (patch)
tree1656959d3d65b061d69d74cef6b740dbc3476683 /testing
parent530e6e88786befa5d1bcd569e480f1b9fec5b102 (diff)
Thu Jun 21 00:01:36 UTC 2012
Diffstat (limited to 'testing')
-rw-r--r--testing/man-db/PKGBUILD56
-rw-r--r--testing/man-db/convert-mans11
-rwxr-xr-xtesting/man-db/man-db.cron.daily39
-rw-r--r--testing/man-db/man-db.install22
-rw-r--r--testing/mlocate/PKGBUILD51
-rw-r--r--testing/mlocate/updatedb.conf4
-rwxr-xr-xtesting/mlocate/updatedb.cron.daily29
7 files changed, 212 insertions, 0 deletions
diff --git a/testing/man-db/PKGBUILD b/testing/man-db/PKGBUILD
new file mode 100644
index 000000000..7ec9750be
--- /dev/null
+++ b/testing/man-db/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 162091 2012-06-19 18:25:25Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
+
+pkgname=man-db
+pkgver=2.6.2
+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' 'libpipeline')
+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.xz{,.sig}
+ convert-mans man-db.cron.daily)
+options=('!libtool')
+md5sums=('647c48d46c464419185d031d04481ee5'
+ 'a9de1f9bbe620a5a9b9f5da8c58cd96c'
+ '2b7662a7d5b33fe91f9f3e034361a2f6'
+ 'd30c39ae47560304471b5461719e0f03')
+
+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
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # 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/testing/man-db/convert-mans b/testing/man-db/convert-mans
new file mode 100644
index 000000000..58a0224b0
--- /dev/null
+++ b/testing/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/testing/man-db/man-db.cron.daily b/testing/man-db/man-db.cron.daily
new file mode 100755
index 000000000..53e66e1e9
--- /dev/null
+++ b/testing/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/testing/man-db/man-db.install b/testing/man-db/man-db.install
new file mode 100644
index 000000000..f6f0f27a6
--- /dev/null
+++ b/testing/man-db/man-db.install
@@ -0,0 +1,22 @@
+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
+ # force database rebuild to get rid off badly imported pages
+ if [ "`vercmp $2 2.6.0.2`" -lt 0 ]; then
+ echo "(re)building database..."
+ mandb -c --quiet
+ fi
+}
+
+post_remove() {
+ rm -rf /var/cache/man
+}
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
+}
diff --git a/testing/mlocate/updatedb.conf b/testing/mlocate/updatedb.conf
new file mode 100644
index 000000000..633c17482
--- /dev/null
+++ b/testing/mlocate/updatedb.conf
@@ -0,0 +1,4 @@
+PRUNE_BIND_MOUNTS = "yes"
+PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset cramfs debugfs devpts devtmpfs ecryptfs exofs ftpfs fuse fuse.encfs fuse.sshfs fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs sshfs sysfs tmpfs ubifs udf usbfs vboxsf"
+PRUNENAMES = ".git .hg .svn"
+PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache /var/lib/pacman/local /var/lock /var/run /var/spool /var/tmp"
diff --git a/testing/mlocate/updatedb.cron.daily b/testing/mlocate/updatedb.cron.daily
new file mode 100755
index 000000000..cac9bb063
--- /dev/null
+++ b/testing/mlocate/updatedb.cron.daily
@@ -0,0 +1,29 @@
+#!/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
+
+UPDATEDB="/usr/bin/updatedb"
+
+if [ -x /usr/bin/nice ]; then
+ UPDATEDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEDB}"
+fi
+
+if [ -x /usr/bin/ionice ]; then
+ UPDATEDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEDB}"
+fi
+
+# Update the "locate" database
+if [ -x /usr/bin/updatedb ]; then
+ if [ -f /etc/updatedb.conf ]; then
+ ${UPDATEDB}
+ else
+ ${UPDATEDB} -f proc
+ fi
+fi