diff options
Diffstat (limited to 'usr.bin/mandoc')
| -rw-r--r-- | usr.bin/mandoc/Makefile | 9 | ||||
| -rw-r--r-- | usr.bin/mandoc/mandoc.ucl | 32 |
2 files changed, 39 insertions, 2 deletions
diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 0d04aad4e558..181d4e16c8ee 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -3,6 +3,8 @@ MANDOCDIR= ${SRCTOP}/contrib/mandoc .PATH: ${MANDOCDIR} +PACKAGE= mandoc + PROG= mandoc MAN= mandoc.1 mandoc.db.5 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 roff.7 MLINKS= mandoc.1 mdocml.1 @@ -16,6 +18,10 @@ LINKS= ${BINDIR}/mandoc ${BINDIR}/whatis \ .error MK_MAN_UTILS should be set to yes when bootstrapping .endif +FILESGROUPS= TRIGGERS +TRIGGERS= mandoc.ucl +TRIGGERSDIR= /usr/share/pkg/triggers + LIBMAN_SRCS= man.c \ man_macro.c \ man_validate.c @@ -54,8 +60,7 @@ LIB_SRCS= ${LIBMAN_SRCS} \ mandoc_xr.c \ msec.c \ preconv.c \ - read.c \ - compat_recallocarray.c \ + read.c HTML_SRCS= eqn_html.c \ html.c \ diff --git a/usr.bin/mandoc/mandoc.ucl b/usr.bin/mandoc/mandoc.ucl new file mode 100644 index 000000000000..75b8123d55cc --- /dev/null +++ b/usr.bin/mandoc/mandoc.ucl @@ -0,0 +1,32 @@ +path_glob: [ + "/usr/share/man/*", + "/usr/share/openssl/man/*", +] + +cleanup: { + type: lua + sandbox: false + script: <<EOD + os.remove("/usr/share/man/mandoc.db") + os.remove("/usr/share/openssl/man/mandoc.db") +EOD +} + +trigger: { + type: lua + sandbox: false + script: <<EOD + + local dirs = { + "/usr/share/man", + "/usr/share/openssl/man", + } + + for _,dir in ipairs(dirs) do + if pkg.stat(dir) then + print("Generating apropos(1) database for "..dir.."...") + pkg.exec({"/usr/bin/makewhatis", dir}) + end + end +EOD +} |
