summaryrefslogtreecommitdiff
path: root/mk
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
commit29fefe52e3f7cf70365b811c757bc70da38944fa (patch)
treeae13569d46a666109d6041531b50702a8539f819 /mk
parent44b11e928cdb1a8992347a7de720d5e852716450 (diff)
downloadpkgsrc-29fefe52e3f7cf70365b811c757bc70da38944fa.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')
-rw-r--r--mk/bsd.pkg.check.mk6
-rw-r--r--mk/bsd.pkg.mk19
-rw-r--r--mk/defaults/mk.conf5
-rw-r--r--mk/emacs.mk15
-rw-r--r--mk/install/bsd.pkginstall.mk33
-rw-r--r--mk/plist/plist-info.awk51
-rw-r--r--mk/plist/plist.mk23
-rw-r--r--mk/plist/print-plist.mk23
8 files changed, 109 insertions, 66 deletions
diff --git a/mk/bsd.pkg.check.mk b/mk/bsd.pkg.check.mk
index 1fd29282ca2..86309223f50 100644
--- a/mk/bsd.pkg.check.mk
+++ b/mk/bsd.pkg.check.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.check.mk,v 1.29 2006/02/23 14:38:07 tron Exp $
+# $NetBSD: bsd.pkg.check.mk,v 1.30 2006/03/20 01:48:57 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the various install-time "check"
@@ -61,8 +61,8 @@ USE_TOOLS+= awk cat cmp diff echo find grep rm sed test \
# handled by pkgsrc.
# Info index files updated when a new info file is added.
-.if defined(INFO_DIR)
-CHECK_FILES_SKIP+= ${PREFIX}/${INFO_DIR}/dir
+.if defined(INFO_FILES)
+CHECK_FILES_SKIP+= ${PREFIX}/.*/dir$$$$
.endif
# Perl's perllocal.pod index that is regenerated when a local module
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 0ef54ea0199..cb55acb3dcd 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1811 2006/03/17 08:02:41 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1812 2006/03/20 01:48:57 jlam Exp $
#
# This file is in the public domain.
#
@@ -581,10 +581,18 @@ USE_GNU_CONFIGURE_HOST?= yes
CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q}
. endif
+# Support for alternative info directories in packages is very sketchy.
+# For now, if we configure a package to install entirely into a
+# subdirectory of ${PREFIX}, then root the info directory directly under
+# that subdirectory.
+#
CONFIGURE_HAS_INFODIR?= yes
-GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/${INFO_DIR}
-. if defined(INFO_FILES) && !empty(INFO_FILES) && \
- !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
+.if ${GNU_CONFIGURE_PREFIX} == ${PREFIX}
+GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/${PKGINFODIR}
+.else
+GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/info
+.endif
+. if defined(INFO_FILES) && !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
CONFIGURE_ARGS+= --infodir=${GNU_CONFIGURE_INFODIR:Q}
. endif
@@ -1839,7 +1847,7 @@ delete-package:
.endif
_PLIST_REGEXP.info= \
- ^${INFO_DIR}/[^/]*\.info(-[0-9]+)?(\.gz)$$
+ ^([^\/]*\/)*${PKGINFODIR}/[^/]*(\.info)?(-[0-9]+)?(\.gz)?$$
_PLIST_REGEXP.man= \
^([^/]*/)+(man[1-9ln]/[^/]*\.[1-9ln]|cat[1-9ln]/[^/]*\.[0-9])(\.gz)?$$
@@ -1968,6 +1976,7 @@ real-su-install: ${MESSAGE}
${ECHO_MSG} "${_PKGSRC_IN}> [Automatic manual page handling]"; \
${CAT} ${PLIST} | ${GREP} -v "^@" | \
${EGREP} ${_PLIST_REGEXP.man:Q} | ${_DOC_COMPRESS}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} install-script-data
.if empty(CHECK_FILES:M[nN][oO])
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} check-files-post
.endif
diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf
index 24d051a5211..80f1d003919 100644
--- a/mk/defaults/mk.conf
+++ b/mk/defaults/mk.conf
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.112 2006/03/09 20:44:45 tonio Exp $
+# $NetBSD: mk.conf,v 1.113 2006/03/20 01:48:58 jlam Exp $
#
# This file provides default values for variables that may be overridden
@@ -207,11 +207,14 @@ VARBASE?= /var
# Default: ${X11PREFIX} or where openmotif or lesstif is installed
INFO_DIR?= info
+PKGINFODIR?= ${INFO_DIR}
# Pathname relative to ${PREFIX} of directory holding the
# info files and the info "dir" (index) file.
# Possible: any path you like, e.g. share/info.
# Default: info (i.e. /usr/pkg/info)
# NOTE: the support for custom setting (not "info") is not complete.
+#
+# XXX INFO_DIR is obsolete and should be removed after pkgsrc-2006Q1.
PKGMANDIR?= man
# Pathname relative to ${PREFIX} of directory holding the
diff --git a/mk/emacs.mk b/mk/emacs.mk
index b0eac9b555b..3b6e6399759 100644
--- a/mk/emacs.mk
+++ b/mk/emacs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: emacs.mk,v 1.24 2006/03/11 06:23:20 uebayasi Exp $
+# $NetBSD: emacs.mk,v 1.25 2006/03/20 01:48:58 jlam Exp $
#
# This Makefile fragment handles Emacs Lisp Packages (== ELPs).
#
@@ -99,7 +99,7 @@
# installed into. Unlike EMACS_ETCPREFIX or
# EMACS_LISPPREFIX, subdirectory is not needed.
# Possible values:
-# ${PREFIX}/info
+# ${PREFIX}/${PKGINFODIR}
# ${PREFIX}/lib/xemacs/site-packages/info
#
# EMACS_LISPPREFIX
@@ -145,7 +145,7 @@
# Same as the one in Makefile, except that
# ${PREFIX} is omitted in PLIST.
# Possible values:
-# info
+# ${PKGINFODIR}
# lib/xemacs/site-packages/info
#
# EMACS_LISPPREFIX
@@ -299,15 +299,18 @@ EMACS_VERSION_MAJOR= ${_EMACS_VERSION_MAJOR}
EMACS_VERSION_MINOR= ${_EMACS_VERSION_MINOR}
.if ${EMACS_FLAVOR} == "emacs"
EMACS_ETCPREFIX= ${PREFIX}/share
-EMACS_INFOPREFIX= ${PREFIX}/info
+EMACS_INFOPREFIX= ${PREFIX}/${PKGINFODIR}
EMACS_LISPPREFIX= ${PREFIX}/share/emacs/site-lisp
EMACS_PKGNAME_PREFIX=
-.else
+.elif ${EMACS_FLAVOR} == "xemacs"
EMACS_ETCPREFIX= ${PREFIX}/lib/xemacs/site-packages/etc
EMACS_INFOPREFIX= ${PREFIX}/lib/xemacs/site-packages/info
EMACS_LISPPREFIX= ${PREFIX}/lib/xemacs/site-packages/lisp
EMACS_PKGNAME_PREFIX= xemacs-
+.else
+PKG_FAIL_REASON+= "\`\`${EMACS_FLAVOR}'' is not a valid EMACS_FLAVOR"
.endif
+GNU_CONFIGURE_INFODIR?= ${EMACS_INFOPREFIX}
_EMACS_FOR.emacs= "@comment "
_EMACS_FOR.emacs21= "@comment "
@@ -328,7 +331,9 @@ _EMACS_FOR.${_EMACS_TYPE}= ""
_EMACS_NOTFOR.${EMACS_FLAVOR}= "@comment "
_EMACS_NOTFOR.${_EMACS_TYPE}= "@comment "
+PLIST_SUBST+= EMACS_FLAVOR=${EMACS_FLAVOR:Q}
PLIST_SUBST+= EMACS_VERSION=${_EMACS_VERSION_NOREV:Q}
+PLIST_SUBST+= EMACS_INFOPREFIX=${EMACS_INFOPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+= EMACS_LISPPREFIX=${EMACS_LISPPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+= FOR_emacs=${_EMACS_FOR.emacs}
PLIST_SUBST+= FOR_emacs21=${_EMACS_FOR.emacs21}
diff --git a/mk/install/bsd.pkginstall.mk b/mk/install/bsd.pkginstall.mk
index ff3fd15f928..b15fde049cb 100644
--- a/mk/install/bsd.pkginstall.mk
+++ b/mk/install/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.43 2006/03/17 18:22:30 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.44 2006/03/20 01:48:58 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -470,18 +470,12 @@ ${_INSTALL_DIRS_FILE}: ../../mk/install/dirs
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
fi
-# INFO_FILES contains names of info files that should be registered or
-# removed from the info directory indices. The listed info files
-# are assumed to be directly under ${INFO_DIR}.
-#
-INFO_FILES?= # empty
-
_INSTALL_INFO_FILES_FILE= ${_PKGINSTALL_DIR}/info-files
_INSTALL_INFO_FILES_DATAFILE= ${_PKGINSTALL_DIR}/info-files-data
_INSTALL_UNPACK_TMPL+= ${_INSTALL_INFO_FILES_FILE}
_INSTALL_DATA_TMPL+= ${_INSTALL_INFO_FILES_DATAFILE}
-.if !empty(INFO_FILES:M*)
+.if defined(INFO_FILES)
USE_TOOLS+= install-info:run
FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q}
.endif
@@ -495,7 +489,7 @@ ${_INSTALL_INFO_FILES_DATAFILE}:
exec 1>>${.TARGET}.tmp; \
while ${TEST} $$# -gt 0; do \
file="$$1"; shift; \
- file=${INFO_DIR:Q}"/$$file"; \
+ file=${PKGINFODIR:Q}"/$$file"; \
${ECHO} "# INFO: $$file"; \
done
${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET}
@@ -505,11 +499,30 @@ ${_INSTALL_INFO_FILES_FILE}: ../../mk/install/info-files
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG} \
${SED} ${FILES_SUBST_SED} ../../mk/install/info-files > ${.TARGET}
+.if !defined(INFO_FILES)
${_PKG_SILENT}${_PKG_DEBUG} \
if ${_ZERO_FILESIZE_P} ${_INSTALL_INFO_FILES_DATAFILE}; then \
${RM} -f ${.TARGET}; \
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
fi
+.endif
+
+.PHONY: install-script-data-info-files
+install-script-data: install-script-data-info-files
+install-script-data-info-files:
+.if defined(INFO_FILES)
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ if ${TEST} -x ${INSTALL_FILE}; then \
+ ${INFO_FILES_cmd} | \
+ while read file; do \
+ ${ECHO} "# INFO: $$file" \
+ >> ${INSTALL_FILE}; \
+ done; \
+ cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
+ ${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} \
+ UNPACK +INFO_FILES; \
+ fi
+.endif
# PKG_SHELL contains the pathname of the shell that should be added or
# removed from the shell database, /etc/shells. If a pathname
@@ -857,7 +870,7 @@ _PKGINSTALL_TARGETS+= release-pkginstall-lock
.ORDER: ${_PKGINSTALL_TARGETS}
-.PHONY: pkginstall
+.PHONY: pkginstall install-script-data
pkginstall: ${_PKGINSTALL_TARGETS}
.PHONY: acquire-pkginstall-lock release-pkginstall-lock
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)
+}
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index 1639fa6d740..6d982ccc0bb 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.6 2006/03/14 17:14:47 jlam Exp $
+# $NetBSD: plist.mk,v 1.7 2006/03/20 01:48:58 jlam Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -92,7 +92,7 @@ MAKEVARS+= _IGNORE_INFO_PATH
#
_PLIST_AWK_ENV+= IMAKE_MANINSTALL=${_IMAKE_MANINSTALL:Q}
_PLIST_AWK_ENV+= IGNORE_INFO_PATH=${_IGNORE_INFO_PATH:Q}
-_PLIST_AWK_ENV+= INFO_DIR=${INFO_DIR:Q}
+_PLIST_AWK_ENV+= PKGINFODIR=${PKGINFODIR:Q}
_PLIST_AWK_ENV+= LIBTOOLIZE_PLIST=${LIBTOOLIZE_PLIST:Q}
_PLIST_AWK_ENV+= LIBTOOL_EXPAND=${_LIBTOOL_EXPAND:Q}
_PLIST_AWK_ENV+= LS=${TOOLS_LS:Q}
@@ -145,6 +145,9 @@ _PLIST_AWK+= -f ${.CURDIR}/../../mk/plist/plist-man.awk
_PLIST_AWK+= -f ${.CURDIR}/../../mk/plist/plist-libtool.awk
_PLIST_AWK+= -f ${.CURDIR}/../../mk/plist/plist-default.awk
+_PLIST_INFO_AWK+= -f ${.CURDIR}/../../mk/plist/plist-functions.awk
+_PLIST_INFO_AWK+= -f ${.CURDIR}/../../mk/plist/plist-info.awk
+
_PLIST_SHLIB_AWK= -f ${_SHLIB_AWKFILE.${SHLIB_TYPE}}
_SHLIB_AWKFILE.COFF= ${.CURDIR}/../../mk/plist/shlib-none.awk
_SHLIB_AWKFILE.ELF= ${.CURDIR}/../../mk/plist/shlib-elf.awk
@@ -188,9 +191,8 @@ _INFO_GENERATE_PLIST= ${TRUE};
# adding the named files to the PLIST.
#
_PLIST_IGNORE_FILES+= +* # package metadata files
-_PLIST_IGNORE_FILES+= info/dir
-. if defined(INFO_DIR) && empty(INFO_DIR:Minfo)
-_PLIST_IGNORE_FILES+= ${INFO_DIR}/dir
+. if defined(INFO_FILES)
+_PLIST_IGNORE_FILES+= ${PKGINFODIR}/dir
. endif
_PLIST_IGNORE_FILES+= *[~\#] *.OLD *.orig *,v # scratch config files
. if !empty(CONF_DEPENDS)
@@ -238,3 +240,14 @@ ${PLIST}:
${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_AWK} | \
${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_SHLIB_AWK} \
> ${.TARGET}
+
+.if defined(INFO_FILES)
+. if empty(INFO_FILES)
+INFO_FILES_cmd= \
+ ${CAT} ${PLIST} | \
+ ${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_INFO_AWK} | \
+ ${AWK} '($$0 !~ "-[0-9]*(\.gz)?$$") { print }'
+. else
+INFO_FILES_cmd= ${TRUE}
+. endif
+.endif
diff --git a/mk/plist/print-plist.mk b/mk/plist/print-plist.mk
index fb57695ff11..7df9dad78aa 100644
--- a/mk/plist/print-plist.mk
+++ b/mk/plist/print-plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: print-plist.mk,v 1.4 2006/03/09 16:39:39 jlam Exp $
+# $NetBSD: print-plist.mk,v 1.5 2006/03/20 01:48:58 jlam Exp $
###
### Automatic PLIST generation
@@ -28,18 +28,16 @@ _PRINT_PLIST_AWK_SUBST+= \
gsub(/${PKGNAME_NOREV}/, "$${PKGNAME}"); \
gsub(/${PKGVERSION:S/./\./g:C/nb[0-9]*$$//}/, "$${PKGVERSION}");\
gsub(/${PKGLOCALEDIR}\/locale/, "$${PKGLOCALEDIR}/locale"); \
+ gsub("^${PKGINFODIR}\/", "info/"); \
gsub("^${PKGMANDIR}\/", "man/"); \
}
-_PRINT_PLIST_AWK_IGNORE= ($$0 ~ /emul\/linux\/proc/)
-_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^info\/dir$$/)
-.if defined(INFO_DIR) && empty(INFO_DIR:Minfo)
-_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${INFO_DIR:S|/|\\/|g}\/dir$$/)
-.endif
-.if defined(INFO_FILES) && !empty(INFO_FILES)
-. for _f_ in ${INFO_FILES}
-_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${INFO_DIR:S|/|\\/|g}\/${_f_:S|+|\+|g}(-[0-9]+)?(\.gz)?$$/)
-. endfor
+_PRINT_PLIST_AWK_IGNORE= ($$0 ~ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}\//)
+_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /emul\/linux\/proc/)
+.if defined(INFO_FILES)
+_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${PKGINFODIR:S|/|\\/|g}\/dir$$/)
+_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${PKGINFODIR:S|/|\\/|g}\/[^\/]+(-[0-9]+)(\.gz)?$$/)
+_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^([^\/]*\/)*(info\/[^\/]+|[^\/]+\.info)(-[0-9]+)(\.gz)?$$/)
.endif
# Common (system) directories not to generate @dirrm statements for
@@ -154,9 +152,12 @@ print-PLIST:
| ${SORT} -r \
| ${AWK} ' \
/emul\/linux\/proc/ { next; } \
- /${PREFIX:S|/|\\/|g}\/\.$$/ { next; } \
+ /${PKG_DBDIR:S|/|\\/|g}\// { next; } \
{ sub("${PREFIX}/\\\\./", ""); } \
+ { sub("^${PKGINFODIR}/", "info/"); } \
{ sub("^${PKGMANDIR}/", "man/"); } \
+ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}(\/|$$)/ { next; } \
+ /^${PKGINFODIR:S|/|\\/|g}$$/ { next; } \
${_PRINT_PLIST_COMMON_DIRS}'` ; \
do \
if [ `${LS} -la ${PREFIX}/$$i | ${WC} -l` = 3 ]; then \