summaryrefslogtreecommitdiffstats
path: root/meta/classes/manpages.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-10 14:35:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-12 15:26:52 +0100
commitf5c128008365e141082c129417eb72d2751e8045 (patch)
treef5d969302d73813c56d3f871d456173ef63fe9a6 /meta/classes/manpages.bbclass
parent7c6c717a54423480c0ac9ed13861e3c1cc47e2b2 (diff)
downloadopenembedded-core-f5c128008365e141082c129417eb72d2751e8045.tar.gz
classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/manpages.bbclass')
-rw-r--r--meta/classes/manpages.bbclass51
1 files changed, 0 insertions, 51 deletions
diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
deleted file mode 100644
index 693fb53671..0000000000
--- a/meta/classes/manpages.bbclass
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright OpenEmbedded Contributors
-#
-# SPDX-License-Identifier: MIT
-#
-
-# Inherit this class to enable or disable building and installation of manpages
-# depending on whether 'api-documentation' is in DISTRO_FEATURES. Such building
-# tends to pull in the entire XML stack and other tools, so it's not enabled
-# by default.
-PACKAGECONFIG:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'manpages', '', d)}"
-
-inherit qemu
-
-# usually manual files are packaged to ${PN}-doc except man-pages
-MAN_PKG ?= "${PN}-doc"
-
-# only add man-db to RDEPENDS when manual files are built and installed
-RDEPENDS:${MAN_PKG} += "${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'man-db', '', d)}"
-
-pkg_postinst:${MAN_PKG}:append () {
- # only update manual page index caches when manual files are built and installed
- if ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'true', 'false', d)}; then
- if test -n "$D"; then
- if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then
- sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} -C - -u -q $D${mandir}
- chown -R root:root $D${mandir}
-
- mkdir -p $D${localstatedir}/cache/man
- cd $D${mandir}
- find . -name index.db | while read index; do
- mkdir -p $D${localstatedir}/cache/man/$(dirname ${index})
- mv ${index} $D${localstatedir}/cache/man/${index}
- chown man:man $D${localstatedir}/cache/man/${index}
- done
- cd -
- else
- $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
- fi
- else
- mandb -q
- fi
- fi
-}
-
-pkg_postrm:${MAN_PKG}:append () {
- # only update manual page index caches when manual files are built and installed
- if ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'true', 'false', d)}; then
- mandb -q
- fi
-}