xref: /freebsd/usr.bin/man/man.conf.5 (revision adf376485712c8fffbf3be330d505a969647f479)
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.\" $FreeBSD$
27.\"
28.Dd June 3, 2011
29.Dt MAN.CONF 5
30.Os
31.Sh NAME
32.Nm man.conf
33.Nd
34.Xr man 1
35and
36.Xr manpath 1
37configuration files
38.Sh DESCRIPTION
39The
40.Nm
41file is used to configure the manual search path, locales, and utility set for
42.Xr man 1
43and its related utilities.
44During initialization,
45.Xr man 1
46reads the configuration files located at
47.Pa /usr/local/etc/man.d/*.conf
48and
49.Pa /etc/man.conf .
50.Pp
51The files contained in
52.Pa /usr/local/etc/man.d/*.conf
53are intended to be used by the
54.Xr ports 7
55system for extending the manual set to support additional paths and locales.
56.Pa /etc/man.conf
57is intended to be used by the local administrator to set additional policy.
58.Pp
59Currently supported configuration variables include:
60.Bl -tag -width 12n -offset indent
61.It MANCONFIG
62Overrides the default location to import additional manual configuration files.
63Defaults to
64.Pa /usr/local/etc/man.d/*.conf .
65.It MANPATH
66Adds the specified directory to the manual search path.
67.It MANLOCALE
68Indicates support is available for the given locale.
69.El
70.Pp
71For pages in a given language, overriding the default toolset for
72display is supported via the following definitions:
73.Pp
74.Bl -tag -width 12n -offset indent -compact
75.It EQN Ns _ Ns Va LANG
76.It NROFF Ns _ Ns Va LANG
77.It PIC Ns _ Ns Va LANG
78.It TBL Ns _ Ns Va LANG
79.It TROFF Ns _ Ns Va LANG
80.It REFER Ns _ Ns Va LANG
81.It VGRIND Ns _ Ns Va LANG
82.El
83.Pp
84See the
85.Sx EXAMPLES
86section for how to use these variables.
87.Sh IMPLEMENTATION NOTES
88The parser used for this utility is very basic and only supports comment
89characters (#) at the beginning of a line.
90.Sh FILES
91.Bl -tag -width "Pa /usr/local/etc/man.d/*.conf" -compact
92.It Pa /etc/man.conf
93System configuration file.
94.It Pa /usr/local/etc/man.d/*.conf
95Local configuration files.
96.El
97.Sh EXAMPLES
98A perl port that needs to install additional manual pages outside of the
99default location could install a file in
100.Pa /usr/local/etc/man.d/perl.conf
101with the following contents:
102.Bd -literal -offset indent
103# Add perl man pages to search path
104MANPATH /usr/local/lib/perl5/5.8.9/man
105MANPATH /usr/local/lib/perl5/5.8.9/perl/man
106.Ed
107.Pp
108A Japanese localization port could install a custom toolset and include a
109file in
110.Pa /usr/local/etc/man.d/ja-man-doc.conf
111with the following contents:
112.Bd -literal -offset indent
113# Setup Japanese toolset
114MANLOCALE	ja_JP.eucJP
115EQN_JA		/usr/local/bin/geqn
116PIC_JA		/usr/local/bin/gpic
117TBL_JA		/usr/local/bin/gtbl
118NROFF_JA	/usr/local/bin/groff -man -dlang=ja_JP.eucJP
119TROFF_JA	/usr/local/bin/groff -man -dlang=ja_JP.euc.jp
120.Ed
121.Pp
122If the system administrator decides to override the
123.Va LOCALBASE
124.Xr make 1
125variable causing all
126.Xr ports 7
127to be installed into
128.Pa /opt
129instead of
130.Pa /usr/local ,
131specifying the following in
132.Pa /etc/man.conf
133will accommodate this change:
134.Bd -literal -offset indent
135# Look for additional configuration files
136MANCONFIG /opt/etc/man.d/*.conf
137.Ed
138.Sh SEE ALSO
139.Xr apropos 1 ,
140.Xr man 1 ,
141.Xr manpath 1 ,
142.Xr whatis 1
143