summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorfredb <fredb@pkgsrc.org>2000-09-11 21:08:49 +0000
committerfredb <fredb@pkgsrc.org>2000-09-11 21:08:49 +0000
commitd509666ce96ba65519f395c0443dfe01c390c602 (patch)
tree0407291ec57345e320426ec4af508532f7fe6905 /x11
parent6149f04faec636511e680dc3e9b274e412466b7f (diff)
downloadpkgsrc-d509666ce96ba65519f395c0443dfe01c390c602.tar.gz
Install a script to maintain the apropos and glimpse databases, and
instructions for using it.
Diffstat (limited to 'x11')
-rw-r--r--x11/tkman/Makefile12
-rw-r--r--x11/tkman/files/mkindex26
-rw-r--r--x11/tkman/pkg/MESSAGE5
-rw-r--r--x11/tkman/pkg/PLIST3
4 files changed, 44 insertions, 2 deletions
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