]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/man/man.conf.5
zfs: merge openzfs/zfs@a94860a6d
[FreeBSD/FreeBSD.git] / usr.bin / man / man.conf.5
1 .\"-
2 .\"  Copyright (c) 2010 Gordon Tetlow
3 .\"  All rights reserved.
4 .\"
5 .\"  Redistribution and use in source and binary forms, with or without
6 .\"  modification, are permitted provided that the following conditions
7 .\"  are met:
8 .\"  1. Redistributions of source code must retain the above copyright
9 .\"     notice, this list of conditions and the following disclaimer.
10 .\"  2. Redistributions in binary form must reproduce the above copyright
11 .\"     notice, this list of conditions and the following disclaimer in the
12 .\"     documentation and/or other materials provided with the distribution.
13 .\"
14 .\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\"  SUCH DAMAGE.
25 .\"
26 .Dd June 3, 2011
27 .Dt MAN.CONF 5
28 .Os
29 .Sh NAME
30 .Nm man.conf
31 .Nd
32 .Xr man 1
33 and
34 .Xr manpath 1
35 configuration files
36 .Sh DESCRIPTION
37 The
38 .Nm
39 file is used to configure the manual search path, locales, and utility set for
40 .Xr man 1
41 and its related utilities.
42 During initialization,
43 .Xr man 1
44 reads the configuration files located at
45 .Pa /usr/local/etc/man.d/*.conf
46 and
47 .Pa /etc/man.conf .
48 .Pp
49 The files contained in
50 .Pa /usr/local/etc/man.d/*.conf
51 are intended to be used by the
52 .Xr ports 7
53 system for extending the manual set to support additional paths and locales.
54 .Pa /etc/man.conf
55 is intended to be used by the local administrator to set additional policy.
56 .Pp
57 Currently supported configuration variables include:
58 .Bl -tag -width 12n -offset indent
59 .It MANCONFIG
60 Overrides the default location to import additional manual configuration files.
61 Defaults to
62 .Pa /usr/local/etc/man.d/*.conf .
63 .It MANPATH
64 Adds the specified directory to the manual search path.
65 .It MANLOCALE
66 Indicates support is available for the given locale.
67 .El
68 .Pp
69 For pages in a given language, overriding the default toolset for
70 display is supported via the following definitions:
71 .Pp
72 .Bl -tag -width 12n -offset indent -compact
73 .It EQN Ns _ Ns Va LANG
74 .It NROFF Ns _ Ns Va LANG
75 .It PIC Ns _ Ns Va LANG
76 .It TBL Ns _ Ns Va LANG
77 .It TROFF Ns _ Ns Va LANG
78 .It REFER Ns _ Ns Va LANG
79 .It VGRIND Ns _ Ns Va LANG
80 .El
81 .Pp
82 See the
83 .Sx EXAMPLES
84 section for how to use these variables.
85 .Sh IMPLEMENTATION NOTES
86 The parser used for this utility is very basic and only supports comment
87 characters (#) at the beginning of a line.
88 .Sh FILES
89 .Bl -tag -width "Pa /usr/local/etc/man.d/*.conf" -compact
90 .It Pa /etc/man.conf
91 System configuration file.
92 .It Pa /usr/local/etc/man.d/*.conf
93 Local configuration files.
94 .El
95 .Sh EXAMPLES
96 A perl port that needs to install additional manual pages outside of the
97 default location could install a file in
98 .Pa /usr/local/etc/man.d/perl.conf
99 with the following contents:
100 .Bd -literal -offset indent
101 # Add perl man pages to search path
102 MANPATH /usr/local/lib/perl5/5.8.9/man
103 MANPATH /usr/local/lib/perl5/5.8.9/perl/man
104 .Ed
105 .Pp
106 A Japanese localization port could install a custom toolset and include a
107 file in
108 .Pa /usr/local/etc/man.d/ja-man-doc.conf
109 with the following contents:
110 .Bd -literal -offset indent
111 # Setup Japanese toolset
112 MANLOCALE       ja_JP.eucJP
113 EQN_JA          /usr/local/bin/geqn
114 PIC_JA          /usr/local/bin/gpic
115 TBL_JA          /usr/local/bin/gtbl
116 NROFF_JA        /usr/local/bin/groff -mandoc -dlang=ja_JP.eucJP
117 TROFF_JA        /usr/local/bin/groff -mandoc -dlang=ja_JP.euc.jp
118 .Ed
119 .Pp
120 If the system administrator decides to override the
121 .Va LOCALBASE
122 .Xr make 1
123 variable causing all
124 .Xr ports 7
125 to be installed into
126 .Pa /opt
127 instead of
128 .Pa /usr/local ,
129 specifying the following in
130 .Pa /etc/man.conf
131 will accommodate this change:
132 .Bd -literal -offset indent
133 # Look for additional configuration files
134 MANCONFIG /opt/etc/man.d/*.conf
135 .Ed
136 .Sh SEE ALSO
137 .Xr apropos 1 ,
138 .Xr man 1 ,
139 .Xr manpath 1 ,
140 .Xr whatis 1