Contents of /portage/man/ebuild.5

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.76 - (show annotations) (download)
Sat Aug 20 04:48:17 2005 UTC (8 years, 11 months ago) by vapier
Branch: MAIN
Changes since 1.75: +24 -24 lines
update use_with/use_enable documentation

1 .TH "EBUILD" "5" "Feb 2003" "Portage 2.0.51" "portage"
2 .SH "NAME"
3 ebuild \- the internal format, variables, and functions in an ebuild script
5 The
6 .BR ebuild (1)
7 program accepts a single ebuild script as an argument. This script
8 contains variables and commands that specify how to download, unpack,
9 patch, compile, install and merge a particular software package from
10 its original sources. In addition to all of this, the ebuild script
11 can also contain pre/post install/remove commands, as required.
13 Here's a simple example ebuild:
15 .DS
16 .nf
17 # Copyright 1999\-2005 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header:
21 inherit some_eclass another_eclass
23 DESCRIPTION="Super\-useful stream editor (sed)"
24 HOMEPAGE="http://www.gnu.org/software/sed/sed.html"
25 SRC_URI="ftp://alpha.gnu.org/pub/gnu/sed/${P}.tar.gz"
28 SLOT="0"
29 KEYWORDS="~x86"
30 IUSE=""
32 DEPEND="virtual/libc"
33 RDEPEND="virtual/libc"
35 src_compile() {
36 econf || die "could not configure"
37 emake || die "emake failed"
38 }
40 src_install() {
41 into /usr
42 doinfo doc/sed.info
43 doman doc/sed.1
44 into /
45 dobin sed/sed || die "dobin sed failed"
46 dodir /usr/bin
47 dosym /bin/sed /usr/bin/sed
49 }
50 .fi
52 .TP
54 - PORTAGE* and PORTDIR* variables may be found in \fBmake.conf\fR(5).
55 .br
56 - When assigning values to variables in ebuilds, you \fBcannot have a space\fR
57 between the variable name and the equal sign.
58 .TP
59 .B P
60 This variable contains the package name without the ebuild revision.
61 This variable must NEVER be modified.
62 .br
63 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$P\fR=='\fIxfree-4.2.1\fR'
64 .TP
65 .B PN
66 Contains the name of the script without the version number.
67 .br
68 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$PN\fR=='\fIxfree\fR'
69 .TP
70 .B PV
71 Contains the version number without the revision.
72 .br
73 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$PV\fR=='\fI4.2.1\fR'
74 .TP
75 .B PR
76 Contains the revision number or 'r0' if no revision number exists.
77 .br
78 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$PR\fR=='\fIr2\fR'
79 .TP
80 .B PVR
81 Contains the version number with the revision.
82 .br
83 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$PVR\fR=='\fI4.2.1-r2\fR'
84 .TP
85 .B PF
86 Contains the full package name \fI[PN]\-[PVR]\fR
87 .br
88 \fBxfree-4.2.1-r2.ebuild\fR --> \fB$PF\fR=='\fIxfree-4.2.1-r2\fR'
89 .TP
90 .B A
91 Contains all source files required for the package. This variable must
92 not be defined. It is autogenerated from the \fISRC_URI\fR variables.
93 .TP
94 \fBWORKDIR\fR = \fI"${PORTAGE_TMPDIR}/portage/${PF}/work"\fR
95 Contains the path to the package build root. Do not modify this variable.
96 .TP
97 \fBFILESDIR\fR = \fI"${PORTDIR}/${CATEGORY}/${PN}/files"\fR
98 Contains the path to the 'files' sub folder in the package specific
99 location in the portage tree. Do not modify this variable.
100 .TP
101 \fBS\fR = \fI"${WORKDIR}/${P}"\fR
102 Contains the path to the temporary \fIbuild directory\fR. This variable
103 is used by the functions \fIsrc_compile\fR and \fIsrc_install\fR. Both
104 are executed with \fIS\fR as the current directory. This variable may
105 be modified to match the extraction directory of a tarball for the package.
106 .TP
107 \fBT\fR = \fI"${PORTAGE_TMPDIR}/portage/${PF}/temp"\fR
108 Contains the path to a \fItemporary directory\fR. You may use this for
109 whatever you like.
110 .TP
111 \fBD\fR = \fI"${PORTAGE_TMPDIR}/portage/${PF}/image"\fR
112 Contains the path to the temporary \fIinstall directory\fR. Every write
113 operation that does not involve the helper tools and functions (found below)
114 should be prefixed with ${D}. Do not modify this variable. This will not be
115 available inside of the pkg_* functions.
116 .TP
117 \fBDESCRIPTION\fR = \fI"A happy little package"\fR
118 Should contain a short description of the package.
119 .TP
120 \fBSRC_URI\fR = \fI"http://happy.com/little/${P}.tar.gz"\fR
121 Contains a list of URI's for the required source files. It can contain
122 multiple URI's for a single source file. The fastest location is chosen
123 if the file was not found at \fIGENTOO_MIRROR\fB\fR.
124 .TP
125 \fBHOMEPAGE\fR = \fI"http://happy.com/"\fR
126 Should contain a list of URL's for the sources main sites and other further
127 package dependent information.
128 .TP
129 \fBKEYWORDS\fR = \fI[-~][x86,ppc,sparc,mips,alpha,arm,hppa]\fR
130 Should contain appropriate list of arches that the ebuild is know to
131 work/not work. By default if you do not know if an ebuild runs under
132 a particular arch simply omit that KEYWORD. If the ebuild will not
133 work on that arch include it as \-ppc for example. If the ebuild is
134 being submitted for inclusion, it must have ~arch set for architectures
135 where it has been PROVEN TO WORK. (Packages KEYWORDed this way may be
136 unmasked for testing by setting ACCEPT_KEYWORDS="~arch" on the command
137 line, or in \fBmake.conf\fR(5)) For an authoritative list please review
138 /usr/portage/profiles/arch.list.
139 .TP
140 \fBSLOT\fR
141 This sets the SLOT for packages that may need to co\-exist. By default
142 you should set \fBSLOT\fR="0" unless you know what you are doing and need
143 to do otherwise. This value should \fINEVER\fR be left undefined.
144 .TP
146 This should be a space delimited list of licenses that the package falls
147 under. This \fB_must_\fR be set to a matching license in
148 /usr/portage/licenses/. If the license does not exist in portage yet you
149 must add it first.
150 .TP
151 \fBIUSE\fR
152 This should be a list of any and all USE flags that are leveraged within
153 your build script. The only USE flags that should not be listed here are
154 arch related flags (see \fBKEYWORDS\fR).
155 .TP
156 \fBDEPEND\fR
157 This should contain a list of all packages that are required for the
158 program to compile.
159 .RS
160 .TP
161 .B DEPEND Atoms
162 A depend atom is simply a dependency that is used by portage when calculating
163 relationships between packages. Please note that if the atom has not already
164 been emerged, then the latest version available is matched.
165 .RS
166 .TP
167 .B Atom Bases
168 The base atom is just a full category/packagename. Hence, these are base atoms:
170 .nf
171 .I sys-apps/sed
172 .I sys-libs/zlib
173 .I net-misc/dhcp
174 .fi
175 .TP
176 .B Atom Versions
177 It is nice to be more specific and say that only certain versions of atoms are
178 acceptable. Note that versions must be combined with a prefix (see below). Hence
179 you may add a version number as a postfix to the base:
181 .nf
182 sys-apps/sed\fI-4.0.5\fR
183 sys-libs/zlib\fI-1.1.4-r1\fR
184 net-misc/dhcp\fI-3.0_p2\fR
185 .fi
187 Versions are normally made up of two or three numbers separated by periods, such
188 as 1.2 or 4.5.2. This string may be followed by a character such as 1.2a or 4.5.2z.
189 Note that this letter is \fBnot\fR meant to indicate alpha, beta, etc... status.
190 For that, use the optional suffix; either _alpha, _beta, _pre (pre-release), _rc
191 (release candidate), or _p (patch). This means for the 3rd pre-release of a package,
192 you would use something like 1.2_pre3.
193 .TP
194 .B Atom Prefix Operators [> >= = <= <]
195 Sometimes you want to be able to depend on general versions rather than specifying
196 exact versions all the time. Hence we provide standard boolean operators:
198 .nf
199 \fI>\fRmedia-libs/libgd-1.6
200 \fI>=\fRmedia-libs/libgd-1.6
201 \fI=\fRmedia-libs/libgd-1.6
202 \fI<=\fRmedia-libs/libgd-1.6
203 \fI<\fRmedia-libs/libgd-1.6
204 .fi
205 .TP
206 .B Extended Atom Prefixes [!~] and Postfixes [*]
207 Now to get even fancier, we provide the ability to define blocking packages and
208 version range matching. Also note that these extended prefixes/postfixes may
209 be combined in any way with the atom classes defined above. Here are some common
210 examples you may find in the portage tree:
212 .nf
213 \fI!\fRapp-text/dos2unix
214 =dev-libs/glib-2\fI*\fR
215 \fI!\fR=net-fs/samba-2\fI*\fR
216 \fI~\fRnet-libs/libnet-1.0.2a
217 .fi
219 \fI!\fR means block packages from being installed at the same time.
220 .br
221 \fI*\fR means match any version of the package so long as the specified base
222 is matched. So with a version of '2*', we can match '2.1', '2.2', '2.2.1',
223 etc... and not match version '1.0', '3.0', '4.1', etc...
224 .br
225 \fI~\fR means match any revision of the base version specified. So in the
226 above example, we would match versions '1.0.2a', '1.0.2a-r1', '1.0.2a-r2',
227 etc...
228 .RE
229 .TP
230 .B Dynamic DEPENDs
231 Sometimes programs may depend on different things depending on the USE
232 variable. Portage offers a few options to handle this. Note that when
233 using the following syntaxes, each case is considered as 1 Atom in the
234 scope it appears. That means that each Atom both conditionally include
235 multiple Atoms and be nested to an infinite depth.
236 .RS
237 .TP
238 .B usevar? ( DEPEND Atom )
239 To include the jpeg library when the user has jpeg in \fBUSE\fR, simply use the
240 following syntax:
241 .br
242 .B jpeg? ( media-libs/jpeg)
243 .TP
244 .B !usevar? ( Atom )
245 If you want to include a package only if the user does not have a certain option
246 in their \fBUSE\fR variable, then use the following syntax:
247 .br
248 .B !nophysfs? ( dev-games/physfs )
249 .br
250 This is often useful for those times when you want to want to add optional support
251 for a feature and have it enabled by default.
252 .TP
253 .B usevar? ( Atom if true ) !usevar? ( Atom if false )
254 For functionality like the tertiary operator found in C you must use
255 two statements, one normal and one inverted. If a package uses
256 GTK2 or GTK1, but not both, then you can handle that like this:
257 .br
258 .B gtk2? ( =x11-libs/gtk+-2* ) !gtk2? ( =x11-libs/gtk+-1* )
259 .br
260 That way the default is the superior GTK2 library.
261 .TP
262 .B || ( Atom Atom ... )
263 When a package can work with a few different packages but a virtual is not
264 appropriate, this syntax can easily be used.
265 .nf
266 .B || (
267 .B app-games/unreal-tournament
268 .B app-games/unreal-tournament-goty
269 .B )
270 .fi
271 Here we see that unreal-tournament has a normal version and it has a goty version.
272 Since they provide the same base set of files, another package can use either.
273 Adding a virtual is inappropriate due to the small scope of it.
274 .br
275 Another good example is when a package can be built with multiple video
276 interfaces, but it can only ever have just one.
277 .nf
278 .B || (
279 .B sdl? ( media-libs/libsdl )
280 .B svga? ( media-libs/svgalib )
281 .B opengl? ( virtual/opengl )
282 .B ggi? ( media-libs/libggi )
283 .B virtual/x11
284 .B )
285 .fi
286 Here only one of the packages will be chosen, and the order of preference is
287 determined by the order in which they appear. So sdl has the best chance of being
288 chosen, followed by svga, then opengl, then ggi, with a default of X if the user
289 does not specify any of the previous choices.
290 .RE
292 .RE
293 .TP
295 This should contain a list of all packages that are required for this
296 program to run (aka runtime depend). If this is not set, then it
297 defaults to the value of \fBDEPEND\fR.
298 .br
299 You may use the same syntax to vary dependencies as seen above in \fBDEPEND\fR.
300 .TP
302 This should contain a list of all packages that will have to be installed after
303 the program has been merged.
304 .br
305 You may use the same syntax to vary dependencies as seen above in \fBDEPEND\fR.
306 .TP
307 \fBRESTRICT\fR = \fI[strip,mirror,fetch,userpriv]\fR
308 This should be a space delimited list of portage features to restrict.
309 .PD 0
310 .RS
311 .TP
312 .I fetch
313 like \fInomirror\fR but the files will not be fetched via \fBSRC_URI\fR either.
314 .TP
315 .I mirror
316 files in \fBSRC_URI\fR will not be downloaded from the \fBGENTOO_MIRRORS\fR.
317 .TP
318 .I primaryuri
319 fetch from URL's in \fBSRC_URI\fR before \fBGENTOO_MIRRORS\fR.
320 .TP
321 .I strip
322 final binaries/libraries will not be stripped of debug symbols.
323 .TP
324 .I userpriv
325 Disables userpriv for specific packages.
326 .RE
327 .PD 1
328 .TP
329 \fBPROVIDE\fR = \fI"virtual/TARGET"\fR
330 This variable should only be used when a package provides a virtual target.
331 For example, blackdown-jdk and sun-jdk provide \fIvirtual/jdk\fR. This
332 allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown
333 or sun specifically.
335 .TP
336 .B inherit
337 Inherit is portage's maintainance of extra classes of functions that
338 are external to ebuilds and provided as inheritable capabilities and
339 data. They define functions and set data types as drop-in replacements,
340 expanded, and simplified routines for extremely common tasks to streamline
341 the build process. Inherit may only be called once in an ebuild and it may
342 \fBnever be wrapped within any conditionals\fR of any kind. Specification of
343 the eclasses contains only their name and not the \fI.eclass\fR extention.
345 .TP
346 .B pkg_nofetch
347 If you turn on \fIfetch\fR in \fBRESTRICT\fR, then this function will be
348 run when the files in \fBSRC_URI\fR cannot be found. Useful for
349 displaying information to the user on *how* to obtain said files. All
350 you have to do is output a message and let the function return. Do not
351 end the function with a call to \fBdie\fR.
352 .TP
353 .B pkg_setup
354 This function can be used if the package needs specific setup actions or
355 checks to be preformed before anything else.
356 .br
357 Initial working directory of ${PORTAGE_TMPDIR}.
358 .TP
359 .B src_unpack
360 This function is used to unpack all the sources in \fIA\fR to \fIWORKDIR\fR.
361 If not defined in the \fIebuild script\fR it calls \fIunpack ${A}\fR. Any
362 patches and other pre configure/compile modifications should be done here.
363 .br
364 Initial working directory of $WORKDIR.
365 .TP
366 .B src_compile
367 All necessary steps for configuration and compilation should be done in here.
368 .br
369 Initial working directory of $S.
370 .TP
371 .B src_test
372 Run all package specific test cases. The default is to run 'make check'
373 followed 'make test'.
374 .br
375 Initial working directory of $S.
376 .TP
377 .B src_install
378 Should contain everything required to install the package in the temporary
379 \fIinstall directory\fR.
380 .br
381 Initial working directory of $S.
382 .TP
383 .B pkg_preinst pkg_postinst
384 All modifications required on the live\-filesystem before and after the
385 package is merged should be placed here. Also commentary for the user
386 should be listed here as it will be displayed last.
387 .br
388 Initial working directory of $PWD.
389 .TP
390 .B pkg_prerm pkg_postrm
391 Like the pkg_*inst functions but for unmerge.
392 .br
393 Initial working directory of $PWD.
394 .TP
395 .B pkg_config
396 This function should contain optional basic configuration steps.
397 .br
398 Initial working directory of $PWD.
400 .TP
401 \fBdie\fR \fI[reason]\fR
402 Causes the current emerge process to be aborted. The final display will
403 include \fIreason\fR.
404 .TP
405 \fBuse\fR \fI<USE item>\fR
406 If \fIUSE item\fR is in the \fBUSE\fR variable, \fIUSE item\fR will be
407 echoed and the function will return 0. If \fIUSE item\fR is not in the
408 \fBUSE\fR variable, the function will return 1. \fBuseq\fR is a non-echoing
409 version of \fBuse\fR.
410 .RS
411 .TP
412 .I Example:
413 .nf
414 if useq gnome ; then
415 guiconf="--enable-gui=gnome --with-x"
416 elif useq gtk ; then
417 guiconf="--enable-gui=gtk --with-x"
418 elif useq X ; then
419 guiconf="--enable-gui=athena --with-x"
420 else
421 # No gui version will be built
422 guiconf=""
423 fi
424 .fi
425 .RE
426 .TP
427 \fBuse_with\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]\fR
428 Useful for creating custom options to pass to a configure script. If \fIUSE
429 item\fR is in the \fBUSE\fR variable and a \fIconfigure opt\fR is specified,
430 then the string \fI--with-[configure name]=[configure opt]\fR will be echoed.
431 If \fIconfigure opt\fR is not specified, then just \fI--with-[configure
432 name]\fR will be echoed. If \fIUSE item\fR is not in the \fBUSE\fR variable,
433 then the string \fI--without-[configure name]\fR will be echoed. If
434 \fIconfigure name\fR is not specified, then \fIUSE item\fR will be used in
435 its place.
436 .RS
437 .TP
438 .I Examples:
439 .nf
440 USE="opengl"
441 myconf=$(use_with opengl)
442 (myconf now has the value "--with-opengl")
444 USE="jpeg"
445 myconf=$(use_with jpeg libjpeg)
446 (myconf now has the value "--with-libjpeg")
448 USE=""
449 myconf=$(use_with jpeg libjpeg)
450 (myconf now has the value "--without-libjpeg")
452 USE="sdl"
453 myconf=$(use_with sdl SDL all-plugins)
454 (myconf now has the value "--with-SDL=all-plugins")
455 .fi
456 .RE
457 .TP
458 \fBuse_enable\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]\fR
459 Same as \fBuse_with\fR above, except that the configure options are
460 \fI--enable-\fR instead of \fI--with-\fR and \fI--disable-\fR instead of
461 \fI--without-\fR.
462 .TP
463 \fBhas\fR \fI<item>\fR \fI<item list>\fR
464 If \fIitem\fR is in \fIitem list\fR, then \fIitem\fR is echoed and \fBhas\fR
465 returns 0. Otherwise, nothing is echoed and 1 is returned. As indicated with
466 use, there is a non-echoing version \fBhasq\fR. Please use \fBhasq\fR in all
467 places where output is to be disregarded. Never use the output for calculation.
468 .br
469 The \fIitem list\fR is delimited by the \fIIFS\fR variable. This variable
470 has a default value of ' ', or a space. It is a \fBbash\fR(1) setting.
471 .TP
472 \fBhas_version\fR \fI<category/package-version>\fR
473 Check to see if \fIcategory/package-version\fR is installed on the system.
474 The parameter accepts all values that are acceptable in the \fBDEPEND\fR
475 variable. The function returns 0 if \fIcategory/package-version\fR is
476 installed, 1 otherwise.
477 .TP
478 \fBbest_version\fR \fI<package name>\fR
479 This function will look up \fIpackage name\fR in the database of currently
480 installed programs and echo the "best version" of the package that is
481 currently installed. The function returns 0 if there is a package that
482 matches \fIpackage name\fR. Otherwise, the function will return 1.
483 .RS
484 .TP
485 .I Example:
486 VERINS="$(best_version net-ftp/glftpd)"
487 .br
488 (VERINS now has the value "net-ftp/glftpd-1.27" if glftpd-1.27 is installed)
489 .RE
491 .TP
492 \fBeinfo\fR \fI"informative message"\fR
493 If you need to display an message that you wish the user to read and take
494 notice of, then use \fBeinfo\fR. It works just like \fBecho\fR(1), but
495 adds a little more to the output so as to catch the user's eye.
496 .TP
497 \fBewarn\fR \fI"warning message"\fR
498 Same as \fBeinfo\fR, but should be used when showing a warning to the user.
499 .TP
500 \fBeerror\fR \fI"error message"\fR
501 Same as \fBeinfo\fR, but should be used when showing an error to the user.
503 .TP
504 \fBunpack\fR \fI<source>\fR \fI[list of more sources]\fR
505 This function uncompresses and/or untars a list of sources into the current
506 directory. The function will append \fIsource\fR to the \fBDISTDIR\fR variable.
508 .TP
509 \fBeconf\fR \fI[configure options]\fR
510 This is used as a replacement for configure. Performs:
511 .nf
512 configure \\
513 --prefix=/usr \\
514 --host=${CHOST} \\
515 --mandir=/usr/share/man \\
516 --infodir=/usr/share/info \\
517 --datadir=/usr/share \\
518 --sysconfdir=/etc \\
519 --localstatedir=/var/lib \\
520 \fI${EXTRA_ECONF}\fR \\
521 \fIconfigure options\fR
522 .fi
523 Note that the \fIEXTRA_ECONF\fR is for users only, not for ebuild
524 writers. If you wish to pass more options to configure, just pass the
525 extra arguements to \fBeconf\fR.
526 .TP
527 \fBemake\fR \fI[make options]\fR
528 This is used as a replacement for make. Performs 'make ${MAKEOPTS}
529 \fImake options\fR' (as set in /etc/make.globals), default is MAKEOPTS="\-j2".
531 \fB***warning***\fR
532 .br
533 if you are going to use \fBemake\fR, make sure your build is happy with
534 parallel makes (make \-j2). It should be tested thoroughly as parallel
535 makes are notorious for failing _sometimes_ but not always.
537 .TP
538 \fBeinstall\fR \fI[make options]\fR
539 This is used as a replacement for make install. Performs:
540 .nf
541 make \\
542 prefix=${D}/usr \\
543 datadir=${D}/usr/share \\
544 infodir=${D}/usr/share/info \\
545 localstatedir=${D}/var/lib \\
546 mandir=${D}/usr/share/man \\
547 sysconfdir=${D}/etc \\
548 \fI${EXTRA_EINSTALL}\fR \\
549 \fImake options\fR \\
550 install
551 .fi
552 Please do \fBnot\fR use this in place of 'make install DESTDIR=${D}'.
553 That is the preferred way of installing make-based packages. Also, do
554 not utilize the \fIEXTRA_EINSTALL\fR variable since it is for users.
556 .PD 0
557 .TP
558 .B prepall
559 .TP
560 .B prepalldocs
561 .TP
562 .B prepallinfo
563 .TP
564 .B prepallman
565 .TP
566 .B prepallstrip
567 .PD 1
568 Useful for when a package installs into \fB${D}\fR via scripts
569 (i.e. makefiles). If you want to be sure that libraries are executable,
570 aclocal files are installed into the right place, doc/info/man files are
571 all compressed, and that executables are all stripped of debugging symbols,
572 then use these suite of functions.
573 .RS
574 .PD 0
575 .TP
576 .B prepall:
577 Runs \fBprepallman\fR, \fBprepallinfo\fR, \fBprepallstrip\fR, sets
578 libraries +x, and then checks aclocal directories. Please note this
579 does \fI*not*\fR run \fBprepalldocs\fR.
580 .TP
581 .B prepalldocs:
582 Compresses all doc files in ${D}/usr/share/doc.
583 .TP
584 .B prepallinfo:
585 Compresses all info files in ${D}/usr/share/info.
586 .TP
587 .B prepallman:
588 Compresses all man files in ${D}/usr/share/man.
589 .TP
590 .B prepallstrip:
591 Strips all executable files of debugging symboles. This includes libraries.
592 .RE
594 .TP
595 \fBprepinfo\fR \fI[dir]\fR
596 .TP
597 \fBpreplib\fR \fI[dir]\fR
598 .TP
599 \fBpreplib.so\fR \fI[dir]\fR
600 .TP
601 \fBprepman\fR \fI[dir]\fR
602 .TP
603 \fBprepstrip\fR \fI[dir]\fR
604 .PD 1
605 Similiar to the \fBprepall\fR functions, these are subtle in their differences.
606 .RS
607 .PD 0
608 .TP
609 .B prepinfo:
610 If a \fIdir\fR is not specified, then \fBprepinfo\fR will assume the dir
611 \fIusr\fR. \fBprepinfo\fR will then compress all the files in
612 ${D}/\fIdir\fR/info.
613 .TP
614 .B preplib:
615 If a \fIdir\fR is not specified, then \fBpreplib\fR will assume the dir
616 \fIusr\fR. \fBpreplib\fR will then run 'ldconfig -n -N' on ${D}/\fIdir\fR/lib.
617 .TP
618 .B preplib.so:
619 All the files with '.so' in their name and are found in ${D}/\fIdir\fR will
620 be stripped of their debug symbols. You may specify multiple directories.
621 .TP
622 .B prepman:
623 If a \fIdir\fR is not specified, then \fBprepman\fR will assume the dir
624 \fIusr\fR. \fBprepman\fR will then compress all the files in
625 ${D}/\fIdir\fR/man/*/.
626 .TP
627 .B prepstrip:
628 All the files found in ${D}/\fIdir\fR will be stripped. You may specify
629 multiple directories.
630 .RE
631 .PD 1
632 .TP
633 \fBdopython\fR \fI<commands>\fR
634 Performs \fIcommands\fR with python and returns the result.
635 .TP
636 \fBdosed\fR \fI"s:orig:change:g" <filename>\fR
637 Performs sed (including cp/mv \fIfilename\fR) on \fIfilename\fR.
638 .br
639 .BR 'dosed\ "s:/usr/local:/usr:g"\ /usr/bin/some-script'
640 runs sed on ${D}/usr/bin/some-script
641 .TP
642 \fBdodir\fR \fI<path>\fR
643 Creates a directory inside of ${D}.
644 .br
645 .BR 'dodir\ /usr/lib/apache'
646 creates ${D}/usr/lib/apache. Note that the do* functions will run
647 \fBdodir\fR for you.
648 .TP
649 \fBdiropts\fR \fI[options for install(1)]\fR
650 Can be used to define options for the install function used in
651 \fBdodir\fR. The default is \fI-m0755\fR.
652 .TP
653 \fBinto\fR \fI<path>\fR
654 Sets the root (\fIDESTTREE\fR) for other functions like \fBdobin\fR,
655 \fBdosbin\fR, \fBdoman\fR, \fBdoinfo\fR, \fBdolib\fR.
656 .br
657 The default root is /usr.
658 .TP
659 \fBkeepdir\fR \fI<path>\fR
660 Tells portage to leave a directory behind even if it is empty. Functions
661 the same as \fBdodir\fR.
662 .TP
663 \fBdobin\fR \fI<binary> [list of more binaries]\fR
664 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/bin.
665 Creates all necessary dirs.
666 .TP
667 \fBdosbin\fR \fI<binary> [list of more binaries]\fR
668 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/sbin.
669 Creates all necessary dirs.
670 .TP
671 \fBdoinitd\fR \fI<init.d script> [list of more init.d scripts]\fR
672 Install Gentoo \fIinit.d scripts\fR. They will be installed into the
673 correct location for Gentoo init.d scripts (/etc/init.d/). Creates all
674 necessary dirs.
675 .TP
676 \fBdoconfd\fR \fI<conf.d file> [list of more conf.d file]\fR
677 Install Gentoo \fIconf.d files\fR. They will be installed into the
678 correct location for Gentoo conf.d files (/etc/conf.d/). Creates all
679 necessary dirs.
680 .TP
681 \fBdoenvd\fR \fI<env.d entry> [list of more env.d entries]\fR
682 Install Gentoo \fIenv.d entries\fR. They will be installed into the
683 correct location for Gentoo env.d entries (/etc/env.d/). Creates all
684 necessary dirs.
686 .PD 0
687 .TP
688 \fBdolib\fR \fI<library>\fR \fI[list of more libraries]\fR
689 .TP
690 \fBdolib.a\fR \fI<library>\fR \fI[list of more libraries]\fR
691 .TP
692 \fBdolib.so\fR \fI<library>\fR \fI[list of more libraries]\fR
693 .PD 1
694 Installs a library or a list of libraries into \fIDESTTREE\fR/lib.
695 Creates all necessary dirs.
696 .TP
697 \fBlibopts\fR \fI[options for install(1)]\fR
698 Can be used to define options for the install function used in
699 the \fBdolib\fR functions. The default is \fI-m0644\fR.
700 .TP
701 \fBdoman\fR \fI[\-i18n=<locale>]\fR \fI<man-page> [list of more man\-pages]\fR
702 Installs manual\-pages into /usr/share/man/man[0\-9n] depending on the
703 manual file ending. The files are compressed if they are not already. You
704 can specify locale-specific manpages with the \fI\-i18n\fR option. Then the
705 man-page will be installed into /usr/share/man/\fI<locale>\fR/man[0\-9n].
706 .PD 0
707 .TP
708 \fBdohard\fR \fI<filename> <linkname>\fR
709 .TP
710 \fBdosym\fR \fI<filename> <linkname>\fR
711 .PD 1
712 Performs the ln command as either a hard link or symlink.
713 .TP
714 \fBdohtml\fR \fI [\-a filetypes] [\-r] [\-x list\-of\-dirs\-to\-ignore] [list\-of\-files\-and\-dirs]\fR
715 Installs the files in the list of files (space\-separated list) into
716 /usr/share/doc/${PF}/html provided the file ends in .html, .png, .js, .jpg,
717 or .css. Setting \fI\-a\fR limits what types of files will be included,
718 \fI\-A\fR appends to the default list, setting \fI\-x\fR sets which dirs to
719 exclude (CVS excluded by default), \fI\-r\fR sets recursive.
720 .TP
721 \fBdoinfo\fR \fI<info-file> [list of more info\-files]\fR
722 Installs info\-pages into \fIDESTDIR\fR/info. Files are automatically
723 gzipped. Creates all necessary dirs.
724 .TP
725 \fBdojar\fR \fI<jar file> [list of more jar files]\fR
726 Installs jar files into /usr/share/${PN}/lib and adds them to
727 /usr/share/${PN}/classpath.env.
728 .TP
729 \fBdomo\fR \fI<locale-file> [list of more locale\-files] \fR
730 Installs locale\-files into \fIDESTDIR\fR/usr/share/locale/[LANG]
731 depending on local\-file's ending. Creates all necessary dirs.
733 .PD 0
734 .TP
735 \fBfowners\fR \fI<permissions> <file> [files]\fR
736 .TP
737 \fBfperms\fR \fI<permissions> <file> [files]\fR
738 .PD 1
739 Performs chown (\fBfowners\fR) or chmod (\fBfperms\fR), applying
740 \fIpermissions\fR to \fIfiles\fR.
741 .TP
742 \fBinsinto\fR \fI[path]\fR
743 Sets the root (\fIINSDESTTREE\fR) for the \fBdoins\fR function.
744 .br
745 The default root is /.
746 .TP
747 \fBinsopts\fR \fI[options for install(1)]\fR
748 Can be used to define options for the install function used in
749 \fBdoins\fR. The default is \fI\-m0644\fR.
750 .TP
751 \fBdoins\fR \fI<file> [list of more files]\fR
752 Installs files into \fIINSDESTTREE\fR. This function uses \fBinstall\fR(1).
753 Creates all necessary dirs.
754 .TP
755 \fBexeinto\fR \fI[path]\fR
756 Sets the root (\fIEXEDESTTREE\fR) for the \fBdoexe\fR function.
757 .br
758 The default root is /.
759 .TP
760 \fBexeopts\fR \fI[options for install(1)]\fR
761 Can be used to define options for the install function used in \fBdoexe\fR.
762 The default is \fI\-m0755\fR.
763 .TP
764 \fBdoexe\fR \fI<executable> [list of more executables]\fR
765 Installs a executable or a list of executable into \fIEXEDESTTREE\fR.
766 This function uses \fBinstall\fR(1). Creates all necessary dirs.
767 .TP
768 \fBdocinto\fR \fI[path]\fR
769 Sets the relative subdir (\fIDOCDESTTREE\fR) used by \fBdodoc\fR.
770 .TP
771 \fBdodoc\fR \fI<document> [list of more documents]\fR
772 Installs a document or a list of document into /usr/share/doc/${PF}/\fIDOCDESTTREE\fR.
773 Files are automatically gzipped. Creates all necessary dirs.
775 .PD 0
776 .TP
777 \fBnewbin\fR \fI<old file> <new filename>\fR
778 .TP
779 \fBnewsbin\fR \fI<old file> <new filename>\fR
780 .TP
781 \fBnewinitd\fR \fI<old file> <new filename>\fR
782 .TP
783 \fBnewconfd\fR \fI<old file> <new filename>\fR
784 .TP
785 \fBnewenvd\fR \fI<old file> <new filename>\fR
786 .TP
787 \fBnewlib\fR \fI<old file> <new filename>\fR
788 .TP
789 \fBnewlib.so\fR \fI<old file> <new filename>\fR
790 .TP
791 \fBnewlib.a\fR \fI<old file> <new filename>\fR
792 .TP
793 \fBnewman\fR \fI<old file> <new filename>\fR
794 .TP
795 \fBnewinfo\fR \fI<old file> <new filename>\fR
796 .TP
797 \fBnewins\fR \fI<old file> <new filename>\fR
798 .TP
799 \fBnewexe\fR \fI<old file> <new filename>\fR
800 .TP
801 \fBnewdoc\fR \fI<old file> <new filename>\fR
802 .PD 1
803 All these functions act like the do* functions, but they only work with one
804 file and the file is installed as \fI[new filename]\fR.
806 Please report bugs via http://bugs.gentoo.org/
807 .SH "SEE ALSO"
808 .BR ebuild (1),
809 .BR make.conf (5)
810 .TP
811 The \fI/usr/sbin/ebuild.sh\fR script.
812 .TP
813 The helper apps in \fI/usr/lib/portage/bin\fR.
814 .SH "FILES"
815 .TP
816 \fB/etc/make.conf\fR
817 Contains variables for the build\-process and overwrites those in make.defaults.
818 .TP
819 \fB/etc/make.globals\fR
820 Contains the default variables for the build\-process, you should edit
821 \fI/etc/make.conf\fR instead.
823 .nf
824 Achim Gottinger <achim@gentoo.org>
825 Mark Guertin <gerk@gentoo.org>
826 Nicholas Jones <carpaski@gentoo.org>
827 Mike Frysinger <vapier@gentoo.org>
828 .fi
830 $Header: /var/cvsroot/gentoo-src/portage/man/ebuild.5,v 1.75 2005/08/16 23:49:14 vapier Exp $

  ViewVC Help
Powered by ViewVC 1.1.20