blob: c4cdbcc3b498831257cfedd4a9bee890973d5450 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command"
2HOMEPAGE = "http://man-db.nongnu.org/"
Andrew Geissler95ac1b82021-03-31 14:34:31 -05003DESCRIPTION = "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."
Andrew Geissler82c905d2020-04-13 13:39:40 -05004LICENSE = "LGPLv2.1 & GPLv2"
5LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
6 file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a"
7
8SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \
9 file://99_mandb \
10 file://man_db.conf-avoid-multilib-install-file-conflict.patch"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060011SRC_URI[sha256sum] = "b66c99edfad16ad928c889f87cf76380263c1609323c280b3a9e6963fdb16756"
Andrew Geissler82c905d2020-04-13 13:39:40 -050012
13DEPENDS = "libpipeline gdbm groff-native base-passwd"
Patrick Williams213cb262021-08-07 19:21:33 -050014RDEPENDS:${PN} += "base-passwd"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060015PACKAGE_WRITE_DEPS += "base-passwd"
Andrew Geissler82c905d2020-04-13 13:39:40 -050016
17# | /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'
Patrick Williams213cb262021-08-07 19:21:33 -050018USE_NLS:libc-musl = "no"
Andrew Geissler82c905d2020-04-13 13:39:40 -050019
20inherit gettext pkgconfig autotools systemd
21
22EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_unitdir}/system"
23EXTRA_AUTORECONF += "-I ${S}/gl/m4"
24
Andrew Geissler82c905d2020-04-13 13:39:40 -050025do_install() {
26 autotools_do_install
27
28 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
29 install -d ${D}/etc/default/volatiles
30 install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles
31 fi
32}
33
Patrick Williams213cb262021-08-07 19:21:33 -050034do_install:append:libc-musl() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050035 rm -f ${D}${libdir}/charset.alias
36}
37
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN} += "${prefix}/lib/tmpfiles.d"
Andrew Geissler82c905d2020-04-13 13:39:40 -050039
Patrick Williams213cb262021-08-07 19:21:33 -050040FILES:${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
Andrew Geissler82c905d2020-04-13 13:39:40 -050041
Patrick Williams213cb262021-08-07 19:21:33 -050042RDEPENDS:${PN} += "groff"
43RRECOMMENDS:${PN} += "less"
44RPROVIDES:${PN} += " man"
Andrew Geissler82c905d2020-04-13 13:39:40 -050045
46def compress_pkg(d):
47 if bb.utils.contains("INHERIT", "compress_doc", True, False, d):
48 compress = d.getVar("DOC_COMPRESS")
49 if compress == "gz":
50 return "gzip"
51 elif compress == "bz2":
52 return "bzip2"
53 elif compress == "xz":
54 return "xz"
55 return ""
56
Patrick Williams213cb262021-08-07 19:21:33 -050057RDEPENDS:${PN} += "${@compress_pkg(d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050058
Patrick Williams213cb262021-08-07 19:21:33 -050059SYSTEMD_SERVICE:${PN} = "man-db.timer man-db.service"
Andrew Geissler82c905d2020-04-13 13:39:40 -050060SYSTEMD_AUTO_ENABLE ?= "disable"