rpmbuild simple copy of files

假如想象 提交于 2019-12-01 07:19:05

%install section is executed on your machine during buildtime of your package. In this section you should create the file structure in %{buildroot}. It is not your task to copy it final destination on client machine.

So you should do something like:

%install
mkdir -p %{buildroot}/usr/lib
cp -a some-your-file-from-extracted-targz %{buildroot}/usr/lib/

and then in %files section:

%files
/usr/lib/foobar.bin
/usr/lib/somedir/

Rpm will then takes all listed files in %files section from %buildroot and will put it in package.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!