docs: import usermanual from org.openembedded.documentation.
[openembedded.git] / docs / usermanual / reference / dirs_install.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <section id="directories_installation" xreflabel="Installation directories">
3   <title>Directories: Installation variables</title>
4
5   <para>The following table provides a list of the variables that are used to
6   control the directories into which files are installed.</para>
7
8   <para>These variables can be used directly by the recipe to refer to paths
9   that will be used after the package is installed. For example, when specify
10   the location of configuration files you need to specify the location on the
11   target as show in the following example from quagga:<screen># Indicate that the default files are configuration files
12 CONFFILES_${PN} = "${sysconfdir}/default/quagga"
13 CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"</screen></para>
14
15   <para>When using these variables to actually install the components of a
16   package from within a bitbake recipe they should used relative to the
17   destination directory, <emphasis role="bold">D</emphasis>. The following
18   example from the quagga recipe shows some addition files being manually
19   installed from within the recipe itself:<screen>do_install () {
20         # Install init script and default settings
21         install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d ${D}${sysconfdir}/quagga
22         install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga</screen></para>
23
24   <informaltable>
25     <tgroup cols="3">
26       <thead>
27         <row>
28           <entry>Variable name</entry>
29
30           <entry>Definition</entry>
31
32           <entry>Typical value</entry>
33         </row>
34       </thead>
35
36       <tbody>
37         <row>
38           <entry>prefix</entry>
39
40           <entry>/usr</entry>
41
42           <entry>/usr</entry>
43         </row>
44
45         <row>
46           <entry>base_prefix</entry>
47
48           <entry align="right"><emphasis>(empty)</emphasis></entry>
49
50           <entry align="right"><emphasis>(empty)</emphasis></entry>
51         </row>
52
53         <row>
54           <entry>exec_prefix</entry>
55
56           <entry>${base_prefix}</entry>
57
58           <entry align="right"><emphasis>(empty)</emphasis></entry>
59         </row>
60
61         <row>
62           <entry>base_bindir</entry>
63
64           <entry>${base_prefix}/bin</entry>
65
66           <entry>/bin</entry>
67         </row>
68
69         <row>
70           <entry>base_sbindir</entry>
71
72           <entry>${base_prefix}/sbin</entry>
73
74           <entry>/sbin</entry>
75         </row>
76
77         <row>
78           <entry>base_libdir</entry>
79
80           <entry>${base_prefix}/lib</entry>
81
82           <entry>/lib</entry>
83         </row>
84
85         <row>
86           <entry>datadir</entry>
87
88           <entry>${prefix}/share</entry>
89
90           <entry>/usr/share</entry>
91         </row>
92
93         <row>
94           <entry>sysconfdir</entry>
95
96           <entry>/etc</entry>
97
98           <entry>/etc</entry>
99         </row>
100
101         <row>
102           <entry>localstatedir</entry>
103
104           <entry>/var</entry>
105
106           <entry>/var</entry>
107         </row>
108
109         <row>
110           <entry>infodir</entry>
111
112           <entry>${datadir}/info</entry>
113
114           <entry>/usr/share/info</entry>
115         </row>
116
117         <row>
118           <entry>mandir</entry>
119
120           <entry>${datadir}/man</entry>
121
122           <entry>/usr/share/man</entry>
123         </row>
124
125         <row>
126           <entry>docdir</entry>
127
128           <entry>${datadir}/doc</entry>
129
130           <entry>/usr/share/doc</entry>
131         </row>
132
133         <row>
134           <entry>servicedir</entry>
135
136           <entry>/srv</entry>
137
138           <entry>/srv</entry>
139         </row>
140
141         <row>
142           <entry>bindir</entry>
143
144           <entry>${exec_prefix}/bin</entry>
145
146           <entry>/usr/bin</entry>
147         </row>
148
149         <row>
150           <entry>sbindir</entry>
151
152           <entry>${exec_prefix}/sbin</entry>
153
154           <entry>/usr/sbin</entry>
155         </row>
156
157         <row>
158           <entry>libexecdir</entry>
159
160           <entry>${exec_prefix}/libexec</entry>
161
162           <entry>/usr/libexec</entry>
163         </row>
164
165         <row>
166           <entry>libdir</entry>
167
168           <entry>${exec_prefix}/lib</entry>
169
170           <entry>/usr/lib</entry>
171         </row>
172
173         <row>
174           <entry>includedir</entry>
175
176           <entry>${exec_prefix}/include</entry>
177
178           <entry>/usr/include</entry>
179         </row>
180
181         <row>
182           <entry>palmtopdir</entry>
183           <entry>${libdir}/opie</entry>
184           <entry>/usr/lib/opie</entry>
185         </row>
186
187         <row>
188           <entry>palmqtdir</entry>
189           <entry>${palmtopdir}</entry>
190           <entry>/usr/lib/opie</entry>
191         </row>
192
193       </tbody>
194     </tgroup>
195   </informaltable>
196
197   <para></para>
198 </section>