Plasma GitLab Archive
Projects Blog Knowledge

.TH "site-lib" "5" "The findlib package manager for OCaml" "User Manual"
.SH "NAME"
.ft R
site-lib - [Location of package directories]\c
.SH "STANDARD LAYOUT"
.ft R
.ft R
.ft B
.nf
\&...somewhere\ in\ the\ filesystem\ hierarchy...\c
\&
.br
\&\ \ \ |\c
\&
.br
\&\ \ \ \e\ \c
\&
.br
\&\ \ \ \ \ site-lib\c
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ stublibs\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ postinstall\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ postremove\c
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ \c
.ft I
package1\c
.ft B
\&
.br
\&\ \ \ \ \ |\ \ |\c
\&
.br
\&\ \ \ \ \ |\ \ +-\ META\c
\&
.br
\&\ \ \ \ \ |\ \ +-\ \c
.ft I
archive\ files\c
.ft B
\&
.br
\&\ \ \ \ \ |\ \ +-\ \c
.ft I
interface\ definitions\c
.ft B
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ \c
.ft I
package2\c
.ft B
\&
.br
\&\ \ \ \ \ +\c
\&
.br
\&\ \ \ \ \ :\c
\&
.br
\&\ \ \ \ \ :\c
\&
.br
\&\ \ \ \ \ \e\c
\&
.br
\&\ \ \ \ \ \ \ \ \c
.ft I
packageN\c
.ft B
.ft R
.fi
.SH "DESCRIPTION"
.ft R
.ft R
Every installation of "findlib" has a default location for package\c
\&  
directories, which is normally a directory called "site-lib". The\c
\&  
location can be set by the configuration variables\c
\&  
path\c
\& (used to look up packages), and\c
\&  
destdir\c
\& (used to install new packages);\c
\&  
see 
findlib.conf\c
\&.\c
.PP
.ft R
The name of a package is the name of the package directory. For\c
\&  
example, if 
destdir=/usr/local/lib/ocaml/site-lib\c
, the\c
\&  
package p will be installed in the subdirectory\c
\&  
/usr/local/lib/ocaml/site-lib/p\c
\&. This subdirectory\c
\&  
must contain the META file and all other files belonging to the package.\c
\&  
Package names must not contain the '.' character.\c
.PP
.ft R
The variable 
destdir\c
\& specifies the directory for\c
\&  
new packages. You can only have one such directory at a time; but of\c
\&  
course you can change this directory in findlib.conf. The command\c
\&  
ocamlfind install\c
\& puts new packages into this\c
\&  
directory; it is recommended to use this command for installation\c
\&  
because it ensures that the directory layout is right.\c
.PP
.ft R
For searching packages, findlib uses (only) the variable\c
\&  
path\c
\& which may name several locations to look at.\c
.PP
.ft R
For systems with DLL support another directory may exist: stublibs. 
\&  
If present, findlib will install DLLs into this directory that is\c
\&  
shared by all packages at the same site-lib location. Findlib remembers\c
\&  
which DLL belongs to which package by special files with the suffix\c
\&  
".owner"; e.g. for the DLL "dllpcre.so" there is another file\c
\&  
"dllpcre.so.owner" containing the string "pcre", so findlib knows\c
\&  
that the package "pcre" owns this DLL. It is not possible that a DLL\c
\&  
is owned by several packages.\c
.PP
.ft R
If the stublibs directory does not exist, DLLs are installed regularly\c
\&  
in the package directories like any other file.\c
.PP
.ft R
For special needs, a postinstall and/or a postremove script may be\c
\&  
installed in the site-lib directory. These scripts are invoked after\c
\&  
installation or removal of a package, respectively.\c
.SH "ALTERNATE LAYOUT"
.ft R
.ft R
.ft R
.ft B
.nf
\&...somewhere\ in\ the\ filesystem\ hierarchy...\c
\&
.br
\&\ \ \ |\c
\&
.br
\&\ \ \ \e\ \c
\&
.br
\&\ \ \ \ \ site-lib\c
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ stublibs\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ postinstall\c
\&
.br
\&\ \ \ \ \ +-\ (optional)\ postremove\c
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ \c
.ft I
package1\c
.ft B
\&
.br
\&\ \ \ \ \ |\ \ |\c
\&
.br
\&\ \ \ \ \ |\ \ +-\ \c
.ft I
archive\ files\c
.ft B
\&
.br
\&\ \ \ \ \ |\ \ +-\ \c
.ft I
interface\ definitions\c
.ft B
\&
.br
\&\ \ \ \ \ |\c
\&
.br
\&\ \ \ \ \ +-\ \c
.ft I
package2\c
.ft B
\&
.br
\&\ \ \ \ \ +\c
\&
.br
\&\ \ \ \ \ :\c
\&
.br
\&\ \ \ \ \ :\c
\&
.br
\&\ \ \ \ \ \e\c
\&
.br
\&\ \ :\ \ \ \ \ \c
.ft I
packageN\c
.ft B
\&
.br
\&\ \ |\c
\&
.br
\&\ \ \e\c
\&
.br
\&\ \ \ \ metaregistry\c
\&
.br
\&\ \ \ \ |\c
\&
.br
\&\ \ \ \ +-\ META.package1\c
\&
.br
\&\ \ \ \ +-\ META.package2\c
\&
.br
\&\ \ \ \ +\c
\&
.br
\&\ \ \ \ :\c
\&
.br
\&\ \ \ \ \e\c
\&
.br
\&\ \ \ \ \ \ \ META.packageN\c
.ft R
.fi
.PP
.ft R
This is an alternate directory layout collecting all META files in one\c
\&  
directory. You can configure this layout by setting\c
\&  
path\c
\& to the absolute location of\c
\&  
metaregistry\c
\&. Findlib recognizes that there are\c
\&  
META files in this directory and uses them; it is not necessary to\c
\&  
include 
site-lib\c
\& into the 
path\c
\&.\c
.PP
.ft R
In order to work, the META files must contain a\c
\&  
directory\c
\& directive pointing to the corresponding\c
\&  
package directory that resides below 
site-lib\c
\&.\c
.PP
.ft R
The command 
ocamlfind install\c
\& copes with this\c
\&  
layout, too. The variable 
destdir\c
\& must contain the\c
\&  
absolute location of 
site-lib\c
, and the variable\c
\&  
metadir\c
\& must contain the absolute location of\c
\&  
metaregistry\c
\&. Note that 
ocamlfind\c
\&  
install\c
\& automatically adds a 
directory\c
\&  
directive to the META file, so you need not do it manually.\c

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml