summaryrefslogtreecommitdiff
path: root/docs/usermanual/reference/dirs_install.xml
blob: 75f85ac930fbe06698e927b94e19f297e0bd4101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" encoding="UTF-8"?>
<section id="directories_installation" xreflabel="Installation directories">
  <title>Directories: Installation variables</title>

  <para>The following table provides a list of the variables that are used to
  control the directories into which files are installed.</para>

  <para>These variables can be used directly by the recipe to refer to paths
  that will be used after the package is installed. For example, when specify
  the location of configuration files you need to specify the location on the
  target as show in the following example from quagga:<screen># Indicate that the default files are configuration files
CONFFILES_${PN} = "${sysconfdir}/default/quagga"
CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"</screen></para>

  <para>When using these variables to actually install the components of a
  package from within a bitbake recipe they should used relative to the
  destination directory, <emphasis role="bold">D</emphasis>. The following
  example from the quagga recipe shows some addition files being manually
  installed from within the recipe itself:<screen>do_install () {
        # Install init script and default settings
        install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d ${D}${sysconfdir}/quagga
        install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga</screen></para>

  <informaltable>
    <tgroup cols="3">
      <thead>
        <row>
          <entry>Variable name</entry>

          <entry>Definition</entry>

          <entry>Typical value</entry>
        </row>
      </thead>

      <tbody>
        <row>
          <entry>prefix</entry>

          <entry>/usr</entry>

          <entry>/usr</entry>
        </row>

        <row>
          <entry>base_prefix</entry>

          <entry align="right"><emphasis>(empty)</emphasis></entry>

          <entry align="right"><emphasis>(empty)</emphasis></entry>
        </row>

        <row>
          <entry>exec_prefix</entry>

          <entry>${base_prefix}</entry>

          <entry align="right"><emphasis>(empty)</emphasis></entry>
        </row>

        <row>
          <entry>base_bindir</entry>

          <entry>${base_prefix}/bin</entry>

          <entry>/bin</entry>
        </row>

        <row>
          <entry>base_sbindir</entry>

          <entry>${base_prefix}/sbin</entry>

          <entry>/sbin</entry>
        </row>

        <row>
          <entry>base_libdir</entry>

          <entry>${base_prefix}/lib</entry>

          <entry>/lib</entry>
        </row>

        <row>
          <entry>datadir</entry>

          <entry>${prefix}/share</entry>

          <entry>/usr/share</entry>
        </row>

        <row>
          <entry>sysconfdir</entry>

          <entry>/etc</entry>

          <entry>/etc</entry>
        </row>

        <row>
          <entry>localstatedir</entry>

          <entry>/var</entry>

          <entry>/var</entry>
        </row>

        <row>
          <entry>infodir</entry>

          <entry>${datadir}/info</entry>

          <entry>/usr/share/info</entry>
        </row>

        <row>
          <entry>mandir</entry>

          <entry>${datadir}/man</entry>

          <entry>/usr/share/man</entry>
        </row>

        <row>
          <entry>docdir</entry>

          <entry>${datadir}/doc</entry>

          <entry>/usr/share/doc</entry>
        </row>

        <row>
          <entry>servicedir</entry>

          <entry>/srv</entry>

          <entry>/srv</entry>
        </row>

        <row>
          <entry>bindir</entry>

          <entry>${exec_prefix}/bin</entry>

          <entry>/usr/bin</entry>
        </row>

        <row>
          <entry>sbindir</entry>

          <entry>${exec_prefix}/sbin</entry>

          <entry>/usr/sbin</entry>
        </row>

        <row>
          <entry>libexecdir</entry>

          <entry>${exec_prefix}/libexec</entry>

          <entry>/usr/libexec</entry>
        </row>

        <row>
          <entry>libdir</entry>

          <entry>${exec_prefix}/lib</entry>

          <entry>/usr/lib</entry>
        </row>

        <row>
          <entry>includedir</entry>

          <entry>${exec_prefix}/include</entry>

          <entry>/usr/include</entry>
        </row>

        <row>
          <entry>palmtopdir</entry>
          <entry>${libdir}/opie</entry>
          <entry>/usr/lib/opie</entry>
        </row>

        <row>
          <entry>palmqtdir</entry>
          <entry>${palmtopdir}</entry>
          <entry>/usr/lib/opie</entry>
        </row>

      </tbody>
    </tgroup>
  </informaltable>

  <para></para>
</section>