site-lib(5)

NAME
site-lib - [Location of package directories]

STANDARD LAYOUT
...somewhere in the filesystem hierarchy...

   |

   \

     site-lib

     |

     +- (optional) stublibs

     +- (optional) postinstall

     +- (optional) postremove

     |

     +-
package1

     |  |

     |  +- META

     |  +-
archive files

     |  +-
interface definitions

     |

     +-
package2

     +

     :

     :

     \

packageN

DESCRIPTION
Every installation of "findlib" has a default location for packagedirectories, which is normally a directory called "site-lib". Thelocation can be set by the configuration variablespath(used to look up packages), anddestdir(used to install new packages);see findlib.conf.

The name of a package is the name of the package directory. Forexample, if destdir=/usr/local/lib/ocaml/site-lib, thepackage p will be installed in the subdirectory/usr/local/lib/ocaml/site-lib/p. This subdirectorymust contain the META file and all other files belonging to the package.Package names must not contain the '.' character.

The variable destdirspecifies the directory fornew packages. You can only have one such directory at a time; but ofcourse you can change this directory in findlib.conf. The commandocamlfind installputs new packages into thisdirectory; it is recommended to use this command for installationbecause it ensures that the directory layout is right.

For searching packages, findlib uses (only) the variablepathwhich may name several locations to look at.

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

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

For special needs, a postinstall and/or a postremove script may beinstalled in the site-lib directory. These scripts are invoked afterinstallation or removal of a package, respectively.

ALTERNATE LAYOUT
...somewhere in the filesystem hierarchy...

   |

   \

     site-lib

     |

     +- (optional) stublibs

     +- (optional) postinstall

     +- (optional) postremove

     |

     +-
package1

     |  |

     |  +-
archive files

     |  +-
interface definitions

     |

     +-
package2

     +

     :

     :

     \

  :
packageN

  |

  \

    metaregistry

    |

    +- META.package1

    +- META.package2

    +

    :

    \

       META.packageN

This is an alternate directory layout collecting all META files in onedirectory. You can configure this layout by settingpathto the absolute location ofmetaregistry. Findlib recognizes that there areMETA files in this directory and uses them; it is not necessary toinclude site-libinto the path.

In order to work, the META files must contain adirectorydirective pointing to the correspondingpackage directory that resides below site-lib.

The command ocamlfind installcopes with thislayout, too. The variable destdirmust contain theabsolute location of site-lib, and the variablemetadirmust contain the absolute location ofmetaregistry. Note that ocamlfindinstallautomatically adds a directorydirective to the META file, so you need not do it manually.