1site-lib(5) File Formats Manual site-lib(5)
2
3
4
6 site-lib - [Location of package directories]
7
9 ...somewhere in the filesystem hierarchy...
10 |
11 \
12 site-lib
13 |
14 +- (optional) stublibs
15 +- (optional) postinstall
16 +- (optional) postremove
17 |
18 +- package1
19 | |
20 | +- META
21 | +- archive files
22 | +- interface definitions
23 |
24 +- package2
25 +
26 :
27 :
28 \
29 packageN
30
32 Every installation of "findlib" has a default location for package
33 directories, which is normally a directory called "site-lib". The loca‐
34 tion can be set by the configuration variables path (used to look up
35 packages), and destdir (used to install new packages); see find‐
36 lib.conf.
37
38 The name of a package is the name of the package directory. For exam‐
39 ple, if destdir=/usr/local/lib/ocaml/site-lib, the package p will be
40 installed in the subdirectory /usr/local/lib/ocaml/site-lib/p. This
41 subdirectory must contain the META file and all other files belonging
42 to the package. Package names must not contain the '.' character.
43
44 The variable destdir specifies the directory for new packages. You can
45 only have one such directory at a time; but of course you can change
46 this directory in findlib.conf. The command ocamlfind install puts new
47 packages into this directory; it is recommended to use this command for
48 installation because it ensures that the directory layout is right.
49
50 For searching packages, findlib uses (only) the variable path which may
51 name several locations to look at.
52
53 For systems with DLL support another directory may exist: stublibs.
54 If present, findlib will install DLLs into this directory that is
55 shared by all packages at the same site-lib location. Findlib remembers
56 which DLL belongs to which package by special files with the suffix
57 ".owner"; e.g. for the DLL "dllpcre.so" there is another file
58 "dllpcre.so.owner" containing the string "pcre", so findlib knows that
59 the package "pcre" owns this DLL. It is not possible that a DLL is
60 owned by several packages.
61
62 If the stublibs directory does not exist, DLLs are installed regularly
63 in the package directories like any other file.
64
65 For special needs, a postinstall and/or a postremove script may be
66 installed in the site-lib directory. These scripts are invoked after
67 installation or removal of a package, respectively.
68
70 ...somewhere in the filesystem hierarchy...
71 |
72 \
73 site-lib
74 |
75 +- (optional) stublibs
76 +- (optional) postinstall
77 +- (optional) postremove
78 |
79 +- package1
80 | |
81 | +- archive files
82 | +- interface definitions
83 |
84 +- package2
85 +
86 :
87 :
88 \
89 : packageN
90 |
91 \
92 metaregistry
93 |
94 +- META.package1
95 +- META.package2
96 +
97 :
98 \
99 META.packageN
100
101 This is an alternate directory layout collecting all META files in one
102 directory. You can configure this layout by setting path to the abso‐
103 lute location of metaregistry. Findlib recognizes that there are META
104 files in this directory and uses them; it is not necessary to include
105 site-lib into the path.
106
107 In order to work, the META files must contain a directory directive
108 pointing to the corresponding package directory that resides below
109 site-lib.
110
111 The command ocamlfind install copes with this layout, too. The variable
112 destdir must contain the absolute location of site-lib, and the vari‐
113 able metadir must contain the absolute location of metaregistry. Note
114 that ocamlfind install automatically adds a directory directive to the
115 META file, so you need not do it manually.
116
117
118
119User Manual The findlib package manager for OCaml site-lib(5)