Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command" |
| 2 | HOMEPAGE = "http://man-db.nongnu.org/" |
| 3 | DESCRIPTION = "man-db is an implementation of the standard Unix documentation system accessed using the man command. It uses a Berkeley DB database in place of the traditional flat-text whatis databases." |
| 4 | LICENSE = "LGPL-2.1-only & GPL-2.0-only" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ |
| 6 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 7 | |
| 8 | SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ |
| 9 | file://99_mandb \ |
| 10 | file://0001-man-Move-local-variable-declaration-to-function-scop.patch \ |
| 11 | file://man_db.conf-avoid-multilib-install-file-conflict.patch" |
| 12 | SRC_URI[sha256sum] = "ee97954d492a13731903c9d0727b9b01e5089edbd695f0cdb58d405a5af5514d" |
| 13 | |
| 14 | DEPENDS = "libpipeline gdbm groff-native base-passwd" |
| 15 | RDEPENDS:${PN} += "base-passwd" |
| 16 | PACKAGE_WRITE_DEPS += "base-passwd" |
| 17 | |
| 18 | # | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr' |
| 19 | USE_NLS:libc-musl = "no" |
| 20 | |
| 21 | inherit gettext pkgconfig autotools systemd |
| 22 | |
| 23 | EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}" |
| 24 | EXTRA_AUTORECONF += "-I ${S}/gl/m4" |
| 25 | |
| 26 | PACKAGECONFIG[bzip2] = "--with-bzip2=bzip2,ac_cv_prog_have_bzip2='',bzip2" |
| 27 | PACKAGECONFIG[gzip] = "--with-gzip=gzip,ac_cv_prog_have_gzip='',gzip" |
| 28 | PACKAGECONFIG[lzip] = "--with-lzip=lzip,ac_cv_prog_have_lzip='',lzip" |
| 29 | PACKAGECONFIG[lzma] = "--with-lzma=lzma,ac_cv_prog_have_lzma='',xz" |
| 30 | PACKAGECONFIG[zstd] = "--with-zstd=zstd,ac_cv_prog_have_zstd='',zstd" |
| 31 | PACKAGECONFIG[xz] = "--with-xz=xz,ac_cv_prog_have_xz='',xz" |
| 32 | |
| 33 | do_install() { |
| 34 | autotools_do_install |
| 35 | |
| 36 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 37 | install -d ${D}/etc/default/volatiles |
| 38 | install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles |
| 39 | fi |
| 40 | } |
| 41 | |
| 42 | do_install:append:libc-musl() { |
| 43 | rm -f ${D}${libdir}/charset.alias |
| 44 | } |
| 45 | |
| 46 | FILES:${PN} += "${prefix}/lib/tmpfiles.d" |
| 47 | |
| 48 | FILES:${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so" |
| 49 | |
| 50 | RDEPENDS:${PN} += "groff" |
| 51 | RRECOMMENDS:${PN} += "less" |
| 52 | RPROVIDES:${PN} += " man" |
| 53 | |
| 54 | def compress_pkg(d): |
| 55 | if bb.utils.contains("INHERIT", "compress_doc", True, False, d): |
| 56 | compress = d.getVar("DOC_COMPRESS") |
| 57 | if compress == "gz": |
| 58 | return "gzip" |
| 59 | elif compress == "bz2": |
| 60 | return "bzip2" |
| 61 | elif compress == "xz": |
| 62 | return "xz" |
| 63 | return "" |
| 64 | |
| 65 | RDEPENDS:${PN} += "${@compress_pkg(d)}" |
| 66 | |
| 67 | SYSTEMD_SERVICE:${PN} = "man-db.timer man-db.service" |
| 68 | SYSTEMD_AUTO_ENABLE ?= "disable" |