Date: Tue, 16 Mar 2021 06:13:27 GMT From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c7e6cb9e08d6 - main - pkgbase: Add an src.conf option for splitting man pages Message-ID: <202103160613.12G6DRql062097@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c7e6cb9e08d6b51e677a9f5546b8e36d678687d0 commit c7e6cb9e08d6b51e677a9f5546b8e36d678687d0 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2021-03-16 06:11:56 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2021-03-16 06:13:09 +0000 pkgbase: Add an src.conf option for splitting man pages Man pages can be big in total, add an options to split man pages in -man packages so we produce smaller packages. This is useful for small jails or mfsroot produced of pkgbase. The option is off by default. Reviewed by: bapt, Mina Galić <me@igalic.co> Differential Revision: https://reviews.freebsd.org/D29169 MFC after: 2 weeks --- release/packages/generate-ucl.sh | 5 +++++ share/man/man5/src.conf.5 | 4 +++- share/mk/bsd.man.mk | 9 +++++++++ share/mk/src.opts.mk | 1 + tools/build/options/WITH_MANSPLITPKG | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index e900f9991912..67c10e485eb7 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -71,6 +71,11 @@ main() { _descr="Debugging Symbols" pkgdeps="${outname}" ;; + *_man) + outname="${outname%%_man}" + _descr="Manual Pages" + pkgdeps="${outname}" + ;; ${origname}) pkgdeps="runtime" ;; diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 5d211bc1cc31..98fcc427d608 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 2, 2021 +.Dd March 16, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1099,6 +1099,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Set to not to install compressed man pages. Only the uncompressed versions will be installed. +.It Va WITH_MANSPLITPKG +Set to split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Set to not build utilities for manual pages, .Xr apropos 1 , diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 1e67928a2754..21c5fe4f2424 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -50,7 +50,11 @@ .error bsd.man.mk cannot be included directly. .endif +.if ${MK_MANSPLITPKG} == "no" MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.else +MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.endif CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat @@ -226,8 +230,13 @@ maninstall: ${MAN} .endif # ${MK_MANCOMPRESS} == "no" .endif .for l t in ${_MANLINKS} +.if ${MK_MANSPLITPKG} == "no" rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.else + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ + ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.endif .endfor manlint: diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 619aa8f4a1d8..949dfece43e4 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -207,6 +207,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ MALLOC_PRODUCTION \ + MANSPLITPKG \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ diff --git a/tools/build/options/WITH_MANSPLITPKG b/tools/build/options/WITH_MANSPLITPKG new file mode 100644 index 000000000000..122da24e0bb4 --- /dev/null +++ b/tools/build/options/WITH_MANSPLITPKG @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to split man pages into their own packages during make package.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103160613.12G6DRql062097>