summaryrefslogtreecommitdiff
path: root/mk/plist/plist-info.awk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-03-20 01:48:57 +0000
committerjlam <jlam@pkgsrc.org>2006-03-20 01:48:57 +0000
commit4a974e6f6ef66acae1af6e5b645e8cc36e48cc39 (patch)
treeae13569d46a666109d6041531b50702a8539f819 /mk/plist/plist-info.awk
parent099c89e3556f83d8a2dadfa46faa57b28eb7789e (diff)
downloadpkgsrc-4a974e6f6ef66acae1af6e5b645e8cc36e48cc39.tar.gz
* Creates a new variable PKGINFODIR (named similarly to PKGMANDIR)
that is a purely user-settable variable to represent the relative path under ${PREFIX} where info files are stored and "dir" files are managed. PKGINFODIR defaults to "info". INFO_DIR still works, but will be obsoleted after the 2006Q1 branch. * Modify GNU_CONFIGURE_INFODIR to only honor ${PKGINFODIR} if the package installs directly into ${PREFIX} and not some subdirectory under ${PREFIX}. This fixes packages that don't really honor $(infodir) all that well, and also avoids PLIST problems relating to directory removal for those packages. * Since the majority of Emacs Lisp packages use GNU_CONFIGURE, just set GNU_CONFIGURE_INFODIR directly to ${EMACS_INFOPREFIX}, which is the Emacs-distro-specific location for info files. Also pass EMACS_INFOPREFIX through PLIST_SUBST for PLIST substitution. * INFO_FILES should be defined if the package installs info files. If the info files are not listed in the PLIST, then INFO_FILES must list the filenames for the info files installed by the package, which are assumed to be located in ${PREFIX}/${PKGINFODIR}. * The plist module can now better detect info files listed in PLISTs and exports a command to the pkginstall module to append info file names to the +INFO_FILES scriptlet at install-time. * The print-PLIST target is updated to properly list info files in the auto-generated PLIST. * The check-files code is updated to skip all "dir" Info database files.
Diffstat (limited to 'mk/plist/plist-info.awk')
-rw-r--r--mk/plist/plist-info.awk51
1 files changed, 25 insertions, 26 deletions
diff --git a/mk/plist/plist-info.awk b/mk/plist/plist-info.awk
index f6c4c593b0c..bf298d62185 100644
--- a/mk/plist/plist-info.awk
+++ b/mk/plist/plist-info.awk
@@ -1,4 +1,4 @@
-# $NetBSD: plist-info.awk,v 1.9 2006/03/14 23:16:01 jlam Exp $
+# $NetBSD: plist-info.awk,v 1.10 2006/03/20 01:48:58 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -44,7 +44,7 @@
### IGNORE_INFO_PATH is a colon-separated list of ${PREFIX}-relative paths
### that do *not* contain info files.
###
-### INFO_DIR is the ${PREFIX}-relative path to the installed info pages.
+### PKGINFODIR is the ${PREFIX}-relative path to the installed info pages.
###
### LS is the path to the "ls" binary.
###
@@ -57,7 +57,7 @@
### the path to a "test" binary.
###
BEGIN {
- INFO_DIR = ENVIRON["INFO_DIR"] ? ENVIRON["INFO_DIR"] : "info"
+ PKGINFODIR = ENVIRON["PKGINFODIR"] ? ENVIRON["PKGINFODIR"] : "info"
LS = ENVIRON["LS"] ? ENVIRON["LS"] : "ls"
MANZ = ENVIRON["MANZ"] ? ENVIRON["MANZ"] : "no"
PREFIX = ENVIRON["PREFIX"] ? ENVIRON["PREFIX"] : "/usr/pkg"
@@ -69,46 +69,41 @@ BEGIN {
}
###
-### Canonicalize info page entries by stripping any ".gz" suffixes.
+### Canonicalize info page entries by converting ${PKGINFODIR}/ to info/.
###
/^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
-/^([^\/]*\/)*info\/[^\/]*(\.info)?-[0-9]+\.gz$/ {
- sub("\\.gz$", "")
+($0 ~ "^" PKGINFODIR "\/[^\/]+(\.info)?(-[0-9]+)?(\.gz)?$") {
+ sub("^" PKGINFODIR "/", "info/")
+}
+($0 !~ "^@dirrm " IGNORE_INFO_REGEXP "$") && \
+($0 ~ "^@dirrm " PKGINFODIR "$") {
+ sub(PKGINFODIR "$", "info")
}
###
-### Ignore *-1, *-2, etc. files in the PLIST as we get the list of
-### installed split files below.
+### Canonicalize info page entries by stripping any ".gz" suffixes.
###
/^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
-/^([^\/]*\/)*info\/[^\/]*(\.info)?-[0-9]+$/ {
- next
+/^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)(-[0-9]+)?\.gz$/ {
+ sub("\.gz$", "")
}
###
-### Convert info/ to ${INFO_DIR}/ for all info page entries.
+### Ignore *-1, *-2, etc. files in the PLIST as we get the list of
+### installed split files below.
###
/^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
-($0 !~ "^([^\/]*\/)*" INFO_DIR "\/[^\/]*(\.info)?$") && \
-/^([^\/]*\/)*info\/[^\/]*(\.info)?$/ {
- if ($0 ~ "^info/") {
- sub("^info/", INFO_DIR "/")
- } else {
- sub("/info/", "/" INFO_DIR "/")
- }
-}
-($0 !~ "^@dirrm " IGNORE_INFO_REGEXP "$") && \
-($0 !~ "^@dirrm " INFO_DIR "$") && \
-/^@dirrm ([^\/]*\/)*info$/ {
- sub("info$", INFO_DIR)
+/^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)-[0-9]+$/ {
+ next
}
###
-### For each info page entry, print all of the installed info sub-pages
-### associated with that entry.
+### For each info page entry, convert any info/ to ${PKGINFODIR}/ and print
+### all of the installed info sub-pages associated with that entry.
###
/^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
-($0 ~ "^([^\/]*\/)*" INFO_DIR "\/[^\/]*(\.info)?$") {
+/^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)$/ {
+ sub("^info/", PKGINFODIR "/")
cmd = TEST " -f " PREFIX "/" $0 " -o -f " PREFIX "/" $0 ".gz"
if (system(cmd) == 0) {
base = $0
@@ -129,3 +124,7 @@ BEGIN {
}
next
}
+($0 !~ "^@dirrm " IGNORE_INFO_REGEXP "$") && \
+($0 ~ "^@dirrm info$") {
+ sub("info$", PKGINFODIR)
+}