man site-lib (Formats) - [Location of package directories]c

NAME

site-lib - [Location of package directories]c

STANDARD LAYOUT

...somewhere in the filesystem hierarchy...c



|c

\ c

site-libc

|c

+- (optional) stublibsc

+- (optional) postinstallc

+- (optional) postremovec

|c

+- c package1c

| |c

| +- METAc

| +- c archive filesc

| +- c interface definitionsc

|c

+- c package2c

+c

:c

:c

\c

c packageNc

DESCRIPTION

Every installation of "findlib" has a default location for packagec directories, which is normally a directory called "site-lib". Thec location can be set by the configuration variablesc pathc (used to look up packages), andc destdirc (used to install new packages);c see findlib.confc .c

The name of a package is the name of the package directory. Forc example, if destdir=/usr/local/lib/ocaml/site-libc , thec package p will be installed in the subdirectoryc /usr/local/lib/ocaml/site-lib/pc . This subdirectoryc must contain the META file and all other files belonging to the package.c Package names must not contain the '.' character.c

The variable destdirc specifies the directory forc new packages. You can only have one such directory at a time; but ofc course you can change this directory in findlib.conf. The commandc ocamlfind installc puts new packages into thisc directory; it is recommended to use this command for installationc because it ensures that the directory layout is right.c

For searching packages, findlib uses (only) the variablec pathc which may name several locations to look at.c

For systems with DLL support another directory may exist: stublibs. If present, findlib will install DLLs into this directory that isc shared by all packages at the same site-lib location. Findlib remembersc which DLL belongs to which package by special files with the suffixc ".owner"; e.g. for the DLL "dllpcre.so" there is another filec "dllpcre.so.owner" containing the string "pcre", so findlib knowsc that the package "pcre" owns this DLL. It is not possible that a DLLc is owned by several packages.c

If the stublibs directory does not exist, DLLs are installed regularlyc in the package directories like any other file.c

For special needs, a postinstall and/or a postremove script may bec installed in the site-lib directory. These scripts are invoked afterc installation or removal of a package, respectively.c

ALTERNATE LAYOUT

...somewhere in the filesystem hierarchy...c



|c

\ c

site-libc

|c

+- (optional) stublibsc

+- (optional) postinstallc

+- (optional) postremovec

|c

+- c package1c

| |c

| +- c archive filesc

| +- c interface definitionsc

|c

+- c package2c

+c

:c

:c

\c

: c packageNc

|c

\c

metaregistryc

|c

+- META.package1c

+- META.package2c

+c

:c

\c

META.packageNc

This is an alternate directory layout collecting all META files in onec directory. You can configure this layout by settingc pathc to the absolute location ofc metaregistryc . Findlib recognizes that there arec META files in this directory and uses them; it is not necessary toc include site-libc into the pathc .c

In order to work, the META files must contain ac directoryc directive pointing to the correspondingc package directory that resides below site-libc .c

The command ocamlfind installc copes with thisc layout, too. The variable destdirc must contain thec absolute location of site-libc , and the variablec metadirc must contain the absolute location ofc metaregistryc . Note that ocamlfindc installc automatically adds a directoryc directive to the META file, so you need not do it manually.c