blob: e8fd47a8f72697f635fee809a2da85f509a2efcc [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command"
2HOMEPAGE = "http://man-db.nongnu.org/"
3DESCRIPTION = "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."
4LICENSE = "LGPL-2.1-only & GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
6 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8SRC_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"
12SRC_URI[sha256sum] = "2ffd8f2e80122fe72e60c740c851e6a3e15c9a7921185eb4752c1c672824bed6"
13
14DEPENDS = "libpipeline gdbm groff-native base-passwd"
15RDEPENDS:${PN} += "base-passwd"
16PACKAGE_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'
19USE_NLS:libc-musl = "no"
20
21inherit gettext pkgconfig autotools systemd
22
23EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}"
24EXTRA_AUTORECONF += "-I ${S}/gl/m4"
25
26PACKAGECONFIG[bzip2] = "--with-bzip2=bzip2,ac_cv_prog_have_bzip2='',bzip2"
27PACKAGECONFIG[gzip] = "--with-gzip=gzip,ac_cv_prog_have_gzip='',gzip"
28PACKAGECONFIG[lzip] = "--with-lzip=lzip,ac_cv_prog_have_lzip='',lzip"
29PACKAGECONFIG[lzma] = "--with-lzma=lzma,ac_cv_prog_have_lzma='',xz"
30PACKAGECONFIG[zstd] = "--with-zstd=zstd,ac_cv_prog_have_zstd='',zstd"
31PACKAGECONFIG[xz] = "--with-xz=xz,ac_cv_prog_have_xz='',xz"
32
33do_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
42do_install:append:libc-musl() {
43 rm -f ${D}${libdir}/charset.alias
44}
45
46FILES:${PN} += "${prefix}/lib/tmpfiles.d"
47
48FILES:${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
49
50RDEPENDS:${PN} += "groff"
51RRECOMMENDS:${PN} += "less"
52RPROVIDES:${PN} += " man"
53
54def 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
65RDEPENDS:${PN} += "${@compress_pkg(d)}"
66
67SYSTEMD_SERVICE:${PN} = "man-db.timer man-db.service"
68SYSTEMD_AUTO_ENABLE ?= "disable"