rpmbuild simple copy of files

前端 未结 1 1768
南笙
南笙 2021-01-14 02:40

Looking for someone to just clarify the %install macro when it comes to just placing files. I created a RPM without errors that is supposed to just take files f

相关标签:
1条回答
  • %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.

    0 讨论(0)
提交回复
热议问题