3.6.3. %setup 宏选项
使用以下 %setup 宏选项来控制源存档的解包。
您可以组合 %setup 宏选项。
| 宏选项 | 描述 |
|---|---|
|
|
使用 |
|
|
使用
例如,当扩展源代码存档中的目录与预期名称不同时,您可以使用这个选项( Name: cello
Source0: https://example.com/%{name}/release/hello-%{version}.tar.gz
...
%prep
%setup -n hello
|
|
|
使用 the /usr/bin/mkdir -p cello-1.0
cd 'cello-1.0'
归档扩展后不会更改该目录。 |
|
|
使用 rm -rf 'cello-1.0'
|
|
|
使用 /usr/bin/gzip -dc '/builddir/build/SOURCES/cello-1.0.tar.gz' | /usr/bin/tar -xvvof -
|
|
|
在进入工作目录前,使用
例如,在单独的 Source0: https://example.com/%{name}/release/%{name}-%{version}.tar.gz
Source1: %{name}-%{version}-examples.tar.gz
...
%prep
%setup -b 1
|
|
|
在进入工作目录后,使用
例如, Source0: https://example.com/%{name}/release/%{name}-%{version}.tar.gz
Source1: examples.tar.gz
...
%prep
%setup -a 1
|