1*4882a593SmuzhiyunSUMMARY = "An implementation of the standard Unix documentation system accessed using the man command" 2*4882a593SmuzhiyunHOMEPAGE = "http://man-db.nongnu.org/" 3*4882a593SmuzhiyunDESCRIPTION = "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*4882a593SmuzhiyunLICENSE = "LGPL-2.1-only & GPL-2.0-only" 5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ 6*4882a593Smuzhiyun file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunSRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ 9*4882a593Smuzhiyun file://99_mandb \ 10*4882a593Smuzhiyun file://0001-man-Move-local-variable-declaration-to-function-scop.patch \ 11*4882a593Smuzhiyun file://man_db.conf-avoid-multilib-install-file-conflict.patch" 12*4882a593SmuzhiyunSRC_URI[sha256sum] = "ee97954d492a13731903c9d0727b9b01e5089edbd695f0cdb58d405a5af5514d" 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunDEPENDS = "libpipeline gdbm groff-native base-passwd" 15*4882a593SmuzhiyunRDEPENDS:${PN} += "base-passwd" 16*4882a593SmuzhiyunPACKAGE_WRITE_DEPS += "base-passwd" 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun# | /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*4882a593SmuzhiyunUSE_NLS:libc-musl = "no" 20*4882a593Smuzhiyun 21*4882a593Smuzhiyuninherit gettext pkgconfig autotools systemd 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunEXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}" 24*4882a593SmuzhiyunEXTRA_AUTORECONF += "-I ${S}/gl/m4" 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunPACKAGECONFIG[bzip2] = "--with-bzip2=bzip2,ac_cv_prog_have_bzip2='',bzip2" 27*4882a593SmuzhiyunPACKAGECONFIG[gzip] = "--with-gzip=gzip,ac_cv_prog_have_gzip='',gzip" 28*4882a593SmuzhiyunPACKAGECONFIG[lzip] = "--with-lzip=lzip,ac_cv_prog_have_lzip='',lzip" 29*4882a593SmuzhiyunPACKAGECONFIG[lzma] = "--with-lzma=lzma,ac_cv_prog_have_lzma='',xz" 30*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "--with-zstd=zstd,ac_cv_prog_have_zstd='',zstd" 31*4882a593SmuzhiyunPACKAGECONFIG[xz] = "--with-xz=xz,ac_cv_prog_have_xz='',xz" 32*4882a593Smuzhiyun 33*4882a593Smuzhiyundo_install() { 34*4882a593Smuzhiyun autotools_do_install 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 37*4882a593Smuzhiyun install -d ${D}/etc/default/volatiles 38*4882a593Smuzhiyun install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles 39*4882a593Smuzhiyun fi 40*4882a593Smuzhiyun} 41*4882a593Smuzhiyun 42*4882a593Smuzhiyundo_install:append:libc-musl() { 43*4882a593Smuzhiyun rm -f ${D}${libdir}/charset.alias 44*4882a593Smuzhiyun} 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunFILES:${PN} += "${prefix}/lib/tmpfiles.d" 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunFILES:${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so" 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunRDEPENDS:${PN} += "groff" 51*4882a593SmuzhiyunRRECOMMENDS:${PN} += "less" 52*4882a593SmuzhiyunRPROVIDES:${PN} += " man" 53*4882a593Smuzhiyun 54*4882a593Smuzhiyundef compress_pkg(d): 55*4882a593Smuzhiyun if bb.utils.contains("INHERIT", "compress_doc", True, False, d): 56*4882a593Smuzhiyun compress = d.getVar("DOC_COMPRESS") 57*4882a593Smuzhiyun if compress == "gz": 58*4882a593Smuzhiyun return "gzip" 59*4882a593Smuzhiyun elif compress == "bz2": 60*4882a593Smuzhiyun return "bzip2" 61*4882a593Smuzhiyun elif compress == "xz": 62*4882a593Smuzhiyun return "xz" 63*4882a593Smuzhiyun return "" 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunRDEPENDS:${PN} += "${@compress_pkg(d)}" 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "man-db.timer man-db.service" 68*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE ?= "disable" 69