aboutsummaryrefslogtreecommitdiff
blob: a221527ce94f13e9b07924d67955d5492b239286 (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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
<?xml version="1.0" encoding="UTF-8"?>
<guide self="function-reference/install-functions/">
<chapter>
<title>Install functions reference</title>
<body>

<p>
The following functions are provided by the package manager to handle various
install-related tasks. <c>${ED}</c> is prepended automatically to the install location.
</p>

<p>
The <c>do*</c> functions, when given multiple arguments, will work upon multiple
targets. The <c>new*</c> functions take exactly two arguments (except as noted) <d />
the first is the source name, the second the name to use when installing.
</p>

<p>
The <c>*into</c> functions create the directory if it does not already exist.
</p>

<table>
  <tr>
    <th>
      Function
    </th>
    <th>
      Details
    </th>
  </tr>
  <tr>
    <ti>
      <c>into</c>
    </ti>
    <ti>
      Change install location for
      <c>dobin</c>, <c>newbin</c>,
      <c>dosbin</c>, <c>newsbin</c>,
      <c>dolib</c>,
      <c>dolib.a</c>, <c>newlib.a</c>,
      <c>dolib.so</c>, <c>newlib.so</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>insinto</c>
    </ti>
    <ti>
      Change install location for <c>doins</c>, <c>newins</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>exeinto</c>
    </ti>
    <ti>
      Change install location for <c>doexe</c>, <c>newexe</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>docinto</c>
    </ti>
    <ti>
      Change install location for <c>dodoc</c>, <c>newdoc</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>insopts</c>
    </ti>
    <ti>
      Specify arguments passed to <c>install</c> (eg <c>-s</c>, <c>-m644</c>)
    </ti>
  </tr>
  <tr>
    <ti>
      <c>diropts</c>
    </ti>
    <ti>
      Specify arguments passed to <c>install</c> for directories
    </ti>
  </tr>
  <tr>
    <ti>
      <c>exeopts</c>
    </ti>
    <ti>
      Specify arguments passed to <c>install</c> for executables
    </ti>
  </tr>
  <tr>
    <ti>
      <c>libopts</c>
    </ti>
    <ti>
      Specify arguments passed to <c>install</c> for libraries
      <b>Note:</b> Banned in EAPI=7
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dobin</c>
    </ti>
    <ti>
      Install a binary into subdirectory <c>bin</c> of the location provided
      by <c>into</c> (resulting in <c>/usr/bin</c> by default) with mode 0755
      and with ownership set to superuser or its equivalent on the system or
      installation at hand
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doconfd</c>
    </ti>
    <ti>
      Install an <c>/etc/conf.d</c> file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dodir</c>
    </ti>
    <ti>
      Install a directory that will be non-empty when the package is
      merged. For directories that will be empty, please use
      <c>keepdir</c> instead.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dodoc</c>
    </ti>
    <ti>
      Install a documentation file into <c>/usr/share/doc/${PF}</c>.
      The <c>-r</c> option allows directories to be installed recursively.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>einstalldocs</c>
    </ti>
    <ti>
      Installs the files and directories specified by the <c>DOCS</c>
      and <c>HTML_DOCS</c> variables into <c>/usr/share/doc/${PF}</c>
      recursively using <c>dodoc -r</c>. <b>Note</b>: Approved in EAPI
      6.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doenvd</c>
    </ti>
    <ti>
      Install an <c>/etc/env.d</c> file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doexe</c>
    </ti>
    <ti>
      Install an executable into the location provided by <c>exeinto</c>,
      by default with mode 0755 or with the install options set by
      <c>exeopts</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doheader</c>
    </ti>
    <ti>
      Install a header file into <c>/usr/include</c>.
      The <c>-r</c> option allows directories to be installed recursively.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dohtml</c>
    </ti>
    <ti>
      Installs HTML document files into <c>/usr/share/doc/${PF}/html</c>
      The <c>-r</c> option allows directories to be installed recursively.
      <b>Note</b>: Deprecated in EAPI 6, switch to <c>einstalldocs</c>
      instead.
      <b>Note:</b> Banned in EAPI=7
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doinfo</c>
    </ti>
    <ti>
      Install a GNU Info document
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doinitd</c>
    </ti>
    <ti>
      Install an <c>/etc/init.d</c> file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doins</c>
    </ti>
    <ti>
      Install a miscellaneous file.
      The <c>-r</c> option allows directories to be installed recursively.
      Any symlinks encountered are installed as symlinks, when installing
      recursively.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dolib</c>
    </ti>
    <ti>
      Install a library file
      <b>Note:</b> Banned in EAPI=7
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dolib.a</c>
    </ti>
    <ti>
      Install a library (<c>.a</c>) file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dolib.so</c>
    </ti>
    <ti>
      Install a library (shared object) file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>doman</c>
    </ti>
    <ti>
      <p>
      Install a man page into the appropriate section of <c>/usr/share/man</c>.
      e.g., <c>foo.1</c> will be installed in <c>/usr/share/man/man1/foo.1</c>.
      </p>
      <p>
      If the man page is named <c>foo.&lt;lang&gt;.1</c> then it will be
      installed in <c>/usr/share/man/&lt;lang&gt;/man1/foo.1</c>, where
      <c>&lt;lang&gt;</c> is a language code. Option <c>-i18n=&lt;lang&gt;</c>
      can be used to explicitly specify a subdirectory (or to suppress it, if
      empty).
      </p>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>domo</c>
    </ti>
    <ti>
      Install a Gettext <c>.mo</c> file.
      (EAPI=7) No longer looks at the value of <c>into</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dosbin</c>
    </ti>
    <ti>
      Install an <c>sbin/</c> file
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dosym</c>
    </ti>
    <ti>
      <p>
      Create a symlink to the target specified as the first parameter, at the
      path specified by the second parameter. With option <c>-r</c> (EAPI 8),
      an absolute path specified for the target will be converted to a path
      relative to the link location.
      </p>
      <p>
      Note: Without option <c>-r</c>, an absolute link target is interpreted
      <e>verbatim</e>, i.e. it must include <c>${EPREFIX}</c> when applicable.
      </p>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>fowners</c>
    </ti>
    <ti>
      Call <c>chown</c> on the specified files in <c>${ED}</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>fperms</c>
    </ti>
    <ti>
      Call <c>chmod</c> on the specified files in <c>${ED}</c>
    </ti>
  </tr>
  <tr>
    <ti>
      <c>keepdir</c>
    </ti>
    <ti>
      Install a directory that will be empty when the package is
      merged. This is like <c>dodir</c>, but for empty directories
      instead. <uri
      link="https://projects.gentoo.org/pms/7/pms.html#x1-14200013.2.2">The
      handling of empty directories is undefined by the package
      manager specification</uri>, and the <c>keepdir</c> function
      exists to ensure that the (otherwise empty) directory is
      tracked. This is accomplished by installing a hidden file
      prefixed with <c>.keep</c> to the directory in question.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newbin</c>
    </ti>
    <ti>
      Install a binary using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newconfd</c>
    </ti>
    <ti>
      Install an <c>/etc/conf.d</c> entry using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newdoc</c>
    </ti>
    <ti>
      Install a documentation file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newenvd</c>
    </ti>
    <ti>
      Install an <c>/etc/env.d</c> file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newexe</c>
    </ti>
    <ti>
      Install an executable file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newheader</c>
    </ti>
    <ti>
      Install a header file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newinitd</c>
    </ti>
    <ti>
      Install an <c>/etc/init.d</c> file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newins</c>
    </ti>
    <ti>
      Install a miscellaneous file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newlib.a</c>
    </ti>
    <ti>
      Install a <c>.a</c> library file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newlib.so</c>
    </ti>
    <ti>
      Install a <c>.so</c> library file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newman</c>
    </ti>
    <ti>
      Install a manual page using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>newsbin</c>
    </ti>
    <ti>
      Install an <c>sbin</c> file using the second argument as the name
    </ti>
  </tr>
  <tr>
    <ti>
      <c>docompress</c>
    </ti>
    <ti>
      Controls compression of files. Normally executed to exclude from
      compression, e.g., <c>docompress -x /usr/share/doc/${PF}/examples</c>.
    </ti>
  </tr>
  <tr>
    <ti>
      <c>dostrip</c>
    </ti>
    <ti>
      Controls stripping of executables. Normally used to exclude from
      stripping, e.g. <c>dostrip -x /usr/$(get_libdir)/important.so</c>.
      May also be used without the <c>-x</c> option to include binaries to
      strip when <c>RESTRICT=strip</c> is set. Provided paths are relative
      to <c>${ED}</c>, even if they begin with a slash.
    </ti>
  </tr>
</table>

</body>
</chapter>
</guide>