There is a project (code in python).

When building rpm in it you need:

  • change file A (there are diffs)
  • add file B

How to describe it in a spec file?

    1 answer 1

    Using patch (s):

    Summary : Some package to be packed Name : some_package Version : 1.0 Release : 1 License : BSD Vendor : user241542 Packager : user241542 Group : Development/Libraries URL : http://www.ru.stackoverflow.com Source : some_package.tar.gz Patch0 : some_package.patch BuildRoot : %{_tmppath}/%{name} %Description The %name package contains library or utility. %Prep %setup -q -n %{name} %patch0 -p1 

    By and large, you can add some arbitrary actions in the %prep - cp , mv , script execution.