summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorreed <reed>2005-10-04 17:27:00 +0000
committerreed <reed>2005-10-04 17:27:00 +0000
commit64ba7c379f26fd18087b0eec76c2a0d7d00715e9 (patch)
tree59d9395aaa3e1fd7499418af7490b19ef407e286 /mk
parente3b8f226875745f800d5fb4f71695c2d6b5db41c (diff)
downloadpkgsrc-64ba7c379f26fd18087b0eec76c2a0d7d00715e9.tar.gz
Add custom PKGMANDIR setting to mk/defaults/mk.conf. This is a
pathname relative to ${PREFIX} of directory holding the manual pages and man directories. I have been using this for over two years. This defaults to "man" so no change. If using GNU_CONFIGURE then set --mandir. (Unless CONFIGURE_HAS_MANDIR is no because some old GNU configure scripts are too old. This is similar to existing CONFIGURE_HAS_INFODIR.) Add PKGMANDIR to PLIST_SUBST. Add plist awk pattern-action statement to convert man/ to ${PKGMANDIR}/. (This might need to be double checked for some PLISTs that prefix some custom settings in front. qmail used to do this, but now I see it does not.) When "Decompressing manual pages" convert man/ also. I have several other changes to commit for individual packages. I chose not to modify the INSTALL_MAN or INSTALLATION_DIRS to also convert man/ to PKGMANDIR/ because I thought this may make it more confusing. So instead, I modify the individual uses of these instead. (Todo: modify pkglint to check for this?) (agc@ of the pkgsrc-pmc asked me to make these changes.)
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk26
-rw-r--r--mk/defaults/mk.conf8
2 files changed, 28 insertions, 6 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 1c8cc533210..8e71087231c 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1721 2005/10/04 16:45:25 reed Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1722 2005/10/04 17:27:00 reed Exp $
#
# This file is in the public domain.
#
@@ -504,7 +504,8 @@ PLIST_SUBST+= OPSYS=${OPSYS} \
RMDIR=${RMDIR:Q} \
RM=${RM:Q} \
TRUE=${TRUE:Q} \
- QMAILDIR=${QMAILDIR}
+ QMAILDIR=${QMAILDIR} \
+ PKGMANDIR=${PKGMANDIR}
# Handle alternatives
#
@@ -728,6 +729,10 @@ CONFIGURE_HAS_INFODIR?= yes
. if !empty(INFO_FILES) && !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
CONFIGURE_ARGS+= --infodir=${PREFIX}/${INFO_DIR}
. endif
+CONFIGURE_HAS_MANDIR?= yes
+. if !empty(CONFIGURE_HAS_MANDIR:M[yY][eE][sS])
+CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
+. endif
#
# By default, override config.guess and config.sub for GNU configure
# packages. pkgsrc's updated versions of these scripts allows GNU
@@ -2132,9 +2137,9 @@ real-su-install: ${MESSAGE}
${PLIST} 2>/dev/null || ${TRUE}`; \
if [ "${_MANCOMPRESSED}" = "yes" -a "${_MANZ}" != "yes" ]; then \
${ECHO_MSG} "${_PKGSRC_IN}> [Automatic manual page handling]"; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Decompressing manual pages for ${PKGNAME}"; \
+ ${ECHO_MSG} "${_PKGSRC_IN}> Decompressing manual pages for ${PKGNAME}"; \
for manpage in $$newmanpages; do \
- manpage=`${ECHO} $$manpage | ${SED} -e 's|\.gz$$||'`; \
+ manpage=`${ECHO} $$manpage | ${SED} -e 's|^man/|${PKGMANDIR}/|' -e 's|\.gz$$||'`; \
if [ -h ${PREFIX}/$$manpage.gz ]; then \
set - `${LS} -l ${PREFIX}/$$manpage.gz | ${SED} -e 's|\.gz$$||'`; \
shift `expr $$# - 1`; \
@@ -4488,9 +4493,18 @@ tags:
# generate ${PLIST} from ${PLIST_SRC} by:
# - substituting for PLIST_SUBST entries
-# - fixing list of man-pages according to MANZ, MANINSTALL.
+# - fixing list of man-pages according to PKGMANDIR, MANZ, MANINSTALL.
# - adding symlinks for shared libs (ELF) or ldconfig calls (a.out).
+# plist awk pattern-action statement to convert man/ to ${PKGMANDIR}/
+_PLIST_AWK_PKGMANDIR= \
+/^([^\/]*\/)*man\/([^\/]*\/)?(man[1-9ln]\/.*[1-9ln]|cat[1-9ln]\/.*[0-9])$$/ { \
+ sub("^man/", "${PKGMANDIR}/"); \
+} \
+/^@dirrm man\// { \
+ sub(" man/", " ${PKGMANDIR}/"); \
+}
+
# plist awk pattern-action statement to handle MANINSTALL
_PLIST_AWK_MANINSTALL= \
{ \
@@ -4593,6 +4607,8 @@ _PLIST_AWK_SCRIPT+= ${_PLIST_AWK_SUBST}
.if !empty(INFO_FILES)
_PLIST_AWK_SCRIPT+= ${_PLIST_AWK_INFO}
.endif
+# Change path to man directory if using custom PKGMANDIR
+_PLIST_AWK_SCRIPT+= ${_PLIST_AWK_PKGMANDIR}
# Expand libtool archives
_PLIST_AWK_SCRIPT+= ${_PLIST_AWK_LIBTOOL}
# Strip the '.gz' suffixes on man entries
diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf
index 634c35dc6ce..f9608dcc0a4 100644
--- a/mk/defaults/mk.conf
+++ b/mk/defaults/mk.conf
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.79 2005/10/03 21:18:55 agc Exp $
+# $NetBSD: mk.conf,v 1.80 2005/10/04 17:27:00 reed Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -221,6 +221,12 @@ MLDONKEY_GROUP?= mldonkey
# Possible: any path
# Default: ${X11PREFIX} or where openmotif or lesstif is installed
+PKGMANDIR?= man
+# Pathname relative to ${PREFIX} of directory holding the
+# manual pages and man directories.
+# Possible: any path you like, e.g. share/man.
+# Default: man (i.e. /usr/pkg/man)
+
USE_XPKGWEDGE?= yes
# Whether we should use xpkgwedge or not to install all packages into
# ${LOCALBASE}.