3.6. The %autosetup and %setup macros
You can use the %autosetup macro to unpack the source archives and apply patches automatically without manually specifying each patch by using the %patch directive.
%autosetup applies patches in the order they appear in the spec file. Always consider keeping sources and patches sorted by their number in spec to avoid unexpected actions. Alternatively, avoid the numbering entirely by using %patchlist or non-numbered Patch entries.
You can also use the %setup macro to unpack the source archives for building RPM packages.
Use the %autosetup macro whenever possible, instead of the %setup macro.
3.6.1. The %autosetup macro options 링크 복사링크가 클립보드에 복사되었습니다!
You can use the following %autosetup macro options to control its behavior. %autosetup also accepts all %setup macro options.
You can combine the %autosetup macro options.
| Macro option | Description |
|---|---|
|
|
Use the |
|
|
Use the |
|
|
Use the |
|
|
Use the |
3.6.2. The %autopatch macro options 링크 복사링크가 클립보드에 복사되었습니다!
The %autopatch macro applies all patches in the order stated in a spec file. You can use the following %autopatch macro options to control its behavior.
You can combine the %autopatch macro options.
| Macro option | Description |
|---|---|
|
|
Use the |
|
|
Use the |
|
|
Use the |
|
|
Use the |
|
|
Use the |
3.6.3. The %setup macro options 링크 복사링크가 클립보드에 복사되었습니다!
You can use the following %setup macro options for controlling the unpacking of source archives.
You can combine the %setup macro options.
| Macro option | Description |
|---|---|
|
|
Use the |
|
|
Use the
For example, you can use this option when the directory from the expanded source code archive has a different name from what is expected (
|
|
|
Use the
The directory is not changed after archive expansion. |
|
|
Use the
|
|
|
Use the
|
|
|
Use the
For example, examples are provided in a separate
|
|
|
Use the
For example, the
|