Библиотека сайта rus-linux.net
Maximum RPM: Taking the Red Hat Package Manager to the Limit | ||
---|---|---|
Prev | Appendix E. Concise Spec File Reference | Next |
Macros
This section describes the various macros used by RPM.
The %setup Macro
|
See also: the section called The %setup Macro in Chapter 13.
The -n <name>
Option
<name>
-n
option is used to set the name of the
software's build directory. This is necessary only when the source
archive unpacks into a directory named other than
<name>
-
<version>
.
|
See also: the section called -n <name>
— Set Name of Build Directory in Chapter 13.
The -c
Option
-c
option is used to direct
%setup to create the top-level build directory
before unpacking the sources.
|
See also: the section called -c — Create Directory (and change to it) Before Unpacking in Chapter 13.
The -D
Option
-D
option is used to direct
%setup to not delete the build directory prior to
unpacking the sources. This option is used when more than one source
archive is to be unpacked into the build directory, normally with the
-b
or -a
options.
|
See also: the section called -D — Do Not Delete Directory Before Unpacking Sources in Chapter 13.
The -T
Option
-T
option is used to direct
%setup to not perform the default unpacking of the
source archive specified by the first Source: tag.
It is used with the -a
or -b
options.
|
See also: the section called -T — Do Not Perform Default Archive Unpacking in Chapter 13.
The -b <n>
Option
<n>
-b
option is used to direct
%setup to unpack the source archive specified on
the nth Source: tag line before
changing directory into the build directory.
|
See also: the section called -b <n>
—
Unpack The nth Sources Before Changing
Directory in Chapter 13.
The -a <n>
Option
<n>
-a
option is used to direct
%setup to unpack the source archive specified on
the nth Source: tag line after
changing directory into the build directory.
|
See also: the section called -a <n>
—
Unpack The nth Sources After Changing Directory in Chapter 13.
The %patch Macro
|
|
See also: the section called The %patch Macro in Chapter 13.
The -P <n>
Option
<n>
-P
option is another method of applying a
specific patch. The number from the Patch: tag
follows the -P
option. The following
%patch macros both apply the patch specified on the
Patch2: tag line:
|
See also: the section called Specifying Which patch Tag to Use in Chapter 13.
The -p<#>
Option
<#>
-p
option is sent directly to the
patch command. It is followed by a number which
specifies the number of leading slashes (and the directories in
between) to strip from any filenames present in the patch file.
|
The -b <name>
Option
<name>
.orig
. The -b
option is used to change the extension used by
patch.
|
See also: the section called -b <name>
— Set the backup file extension to
<name>
in Chapter 13.
The %patch -E Option
The -E
option is sent directly to the
patch command. It is used to direct
patch to remove any empty files after the patches
have been applied.
See also: the section called -E — Remove Empty Output Files in Chapter 13.