packages: Add a mandoc package
Move mandoc to its own package so users can install it independently of -utilities. Put the package in the minimal set, since we also ship manpages in minimal and "man" is a basic Unix utility. Add a pkg-triggers(5) hook to run makewhatis when new manpages are installed, so that apropos(1) works. This depends on a new pkg(8) feature expected to be in in the upcoming 2.3.2 release; in the mean time, this is a no-op (i.e., having an older pkg doesn't break anything, it just won't run the trigger). MFC after: 3 seconds Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52564
This commit is contained in:
@@ -28,6 +28,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW:
|
||||
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||
|
||||
20250918:
|
||||
mandoc (including /usr/bin/man) has been moved to a new package,
|
||||
FreeBSD-mandoc. If you have the minimal set installed, this package
|
||||
will be installed automatically, otherwise you may want to install it.
|
||||
|
||||
Kyua has been moved to the FreeBSD-kyua package, and ATF has been moved
|
||||
to the FreeBSD-atf* packages. If you have FreeBSD-tests installed,
|
||||
these packages will be installed automatically, otherwise you should
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
comment = "Online manual page reader"
|
||||
|
||||
desc = <<EOD
|
||||
This packages provides man(1), a utility which can format and display system
|
||||
manual pages, along with the related utilities apropos(1) and makewhatis(8),
|
||||
and the mandoc(1) backend.
|
||||
EOD
|
||||
|
||||
annotations {
|
||||
set = minimal
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
PACKAGE= mandoc
|
||||
|
||||
SCRIPTS= man.sh
|
||||
LINKS= ${BINDIR}/man ${BINDIR}/manpath
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
path_glob: "/usr/share/man/*"
|
||||
|
||||
cleanup: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOD
|
||||
os.remove("/usr/share/man/mandoc.db")
|
||||
EOD
|
||||
}
|
||||
|
||||
trigger: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOD
|
||||
print("Generating apropos(1) database...")
|
||||
pkg.exec({"/usr/bin/makewhatis", "/usr/share/man"})
|
||||
EOD
|
||||
}
|
||||
Reference in New Issue
Block a user