From d509666ce96ba65519f395c0443dfe01c390c602 Mon Sep 17 00:00:00 2001 From: fredb Date: Mon, 11 Sep 2000 21:08:49 +0000 Subject: Install a script to maintain the apropos and glimpse databases, and instructions for using it. --- x11/tkman/Makefile | 12 +++++++++++- x11/tkman/files/mkindex | 26 ++++++++++++++++++++++++++ x11/tkman/pkg/MESSAGE | 5 +++++ x11/tkman/pkg/PLIST | 3 ++- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 x11/tkman/files/mkindex create mode 100644 x11/tkman/pkg/MESSAGE (limited to 'x11/tkman') diff --git a/x11/tkman/Makefile b/x11/tkman/Makefile index e23901ece5b..0125c9bf159 100644 --- a/x11/tkman/Makefile +++ b/x11/tkman/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2000/08/31 03:58:14 fredb Exp $ +# $NetBSD: Makefile,v 1.24 2000/09/11 21:08:49 fredb Exp $ # FreeBSD Id: Makefile,v 1.28 1997/12/08 15:51:20 tg Exp # @@ -17,6 +17,16 @@ DEPENDS+= tk-8.3.2:../../x11/tk USE_X11= yes +MESSAGE_FILE= ${WRKDIR}/MESSAGE WRKSRC= ${WRKDIR}/${PKGNAME} +post-install: + ${SED} -e 's|@@LOCALBASE@@|${LOCALBASE}|' \ + -e 's|@@PREFIX@@|${PREFIX}|' \ + -e 's|@@X11BASE@@|${X11BASE}|' \ + < ${FILESDIR}/mkindex > ${WRKDIR}/mkindex + ${SED} -e 's|@@PREFIX@@|${PREFIX}|' \ + < ${PKGDIR}/MESSAGE > ${WRKDIR}/MESSAGE + ${INSTALL_SCRIPT} ${WRKDIR}/mkindex ${PREFIX}/libexec + .include "../../mk/bsd.pkg.mk" diff --git a/x11/tkman/files/mkindex b/x11/tkman/files/mkindex new file mode 100644 index 00000000000..6d08d9f19b9 --- /dev/null +++ b/x11/tkman/files/mkindex @@ -0,0 +1,26 @@ +#!/bin/sh +# $NetBSD: mkindex,v 1.1 2000/09/11 21:08:50 fredb Exp $ +# +# This is a script to construct the glimpse databases for tkman, +# and also the apropos databases shared by tkman, man, and xman. +# We don't do this as part of the package install because it could +# be very time-consuming. It is possible to simply run tkman as root, +# and exercise the menu option to "rebuild databases", but it could +# take a long time, and who wants to run an X app as root, anyway? +# +# You might run this on a weekly basis by adding the following +# entry to root's crontab (edited to taste): +# +# 10 2 * * 6 @@PREFIX@@/libexec/mkindex + +# Don't add /usr/local to the list unless there's something there, +# because an empty glimpse database will cause tkman to squawk. +for i in /usr/share @@LOCALBASE@@ @@X11BASE@@; do + echo "Rebuilding glimpse database in $i/man..." + @@LOCALBASE@@/bin/glimpseindex -o -B -z -H $i/man $i/man/man? + chmod a+r $i/man/.glimpse_* + echo + echo "Rebuilding apropos database in $i/man..." + /usr/libexec/makewhatis $i/man + echo +done diff --git a/x11/tkman/pkg/MESSAGE b/x11/tkman/pkg/MESSAGE new file mode 100644 index 00000000000..1662d1ae510 --- /dev/null +++ b/x11/tkman/pkg/MESSAGE @@ -0,0 +1,5 @@ +You can have the glimpse and apropos databases, needed by tkman, +kept up-to-date by adding the following entry to root's crontab +(edit to taste): + +10 2 * * 6 @@PREFIX@@/libexec/mkindex diff --git a/x11/tkman/pkg/PLIST b/x11/tkman/pkg/PLIST index 86cc2ce2ab3..7971a0438e1 100644 --- a/x11/tkman/pkg/PLIST +++ b/x11/tkman/pkg/PLIST @@ -1,3 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 1997/11/27 13:58:09 explorer Exp $ +@comment $NetBSD: PLIST,v 1.5 2000/09/11 21:08:50 fredb Exp $ bin/tkman bin/retkman +libexec/mkindex -- cgit v1.2.3