В начало → Ebuild HOWTO (Англ.) → File system Locations |
The file system layout standards used in Gentoo Linux closely follow the FHS, short for File system Hierarchy Standard. A simplified description of the standard is given here; for a complete specification go to http://www.pathname.com/fhs/.
The /opt
hierarchy is addressed in section 3.12 of the FHS. Section 4.4 deals with the /usr/X11R6
directory. KDE and GNOME are not specifically addressed, and are in fact not even mentioned in the current version of the
FHS.
Usually, if the package uses autoconf and automake, the default installation destinations are mostly correct, with a few exceptions:
If you're installing a program into /bin
, /sbin
, /usr/bin
, or /usr/sbin
, then the program's corresponding man page should be installed into the /usr/share/man
tree. This can often be accomplished by specifying a ./configure --mandir=/usr/share/man in the ebuild.
GNU info files should always be installed to /usr/share/info
, even if the info files are about X11, GNOME or KDE-specific programs or tools. Make a note: /usr/share/info
is the only official location for GNU info files. Since many ./configure
scripts default to installing GNU info files in /usr/info
, it's often necessary to call ./configure with the --infodir=/usr/share/info
argument.
Documentation files are installed in /usr/share/doc
, into a subdirectory reflecting the name, version, and revision of the particular program. This applies to all programs:
GNOME, KDE, X11 and console alike. However, some programs may install additional documentation and support files into a /usr/share
hierarchy for their own purposes.
X11-specific programs and libraries should always be installed into /usr
, not directly into /usr/X11R6
. We reserve the /usr/X11R6
hierarchy for the X Window System, Version 11 Release 6 itself. This is perhaps a more to-the-letter interpretation of the FHS than some other distributions have made.
GNOME and KDE programs, similarly, should always be installed into /usr
.
Some distributions choose to install GNOME and KDE into /opt
. There exists no standard for these desktop environments in terms of where to actually install their files. In the interests
of simplicity and consistency, we elect to install all KDE and GNOME packages into the /usr
hierarchy.
In general, you should have ebuilds install their files into the /usr
tree. Some programs can be compiled and linked with or without GNOME, KDE, and X11 libraries, which can cause confusion.
Our solution is to install everything into /usr
which avoids ambiguity and needless complexity for ebuild authors. The location in which to install a program's files should
not depend on the presence or absence of specific USE
variables. Therefore, the ebuilds in the portage tree almost always install into the /usr
hierarchy exclusively.
The /opt
directory is reserved in Gentoo Linux for binary-only packages. Examples include mozilla-bin, acroread, netscape and realplayer.
Packages that get installed here will usually require a /etc/env.d/foo
stub file. This is so that paths and additional variables can be included into the environment. For more information on /etc/env.d
, please visit this document.
В начало → Ebuild HOWTO (Англ.) → File system Locations |