diff options
author | reed <reed@pkgsrc.org> | 2005-10-04 17:27:00 +0000 |
---|---|---|
committer | reed <reed@pkgsrc.org> | 2005-10-04 17:27:00 +0000 |
commit | 769bcbf57c4e332d304047bccd80c34fab814487 (patch) | |
tree | 59d9395aaa3e1fd7499418af7490b19ef407e286 /mk/bsd.pkg.mk | |
parent | c6e2a385419a7fd0b8cdec22eb14a44596d549bb (diff) | |
download | pkgsrc-769bcbf57c4e332d304047bccd80c34fab814487.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/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 26 |
1 files changed, 21 insertions, 5 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 |