In my spec file for packaging a python rpm, I want to remove certain filetypes in certain directories:
e.g., I want to exclude source *.py files in these directories:
lib/*.py
comm/*.py
I think I should do this in the %file section of my spec. Any suggestions?
The BUILD directory is used during the build process of the RPM package. This is where the temporary files are stored, moved around, etc. The RPMS directory holds RPM packages built for different architectures and noarch if specified in . spec file or during the build.
in the %install section, you are supposed to install all your files in the %{buildroot] directory; just the way they will be installed on the final system. there seems to have been a %{_prefix} variable declared; he just creates that directory.
By using Buildroot: in your spec file you are indicating that your package can be built (installed into and packaged from) a user-definable directory. This helps package building by normal users. RPM will use the buildroot listed in the spec file as the default buildroot.
Spec files are plain-text files that are used to construct spec strings. They consist of a sequence of directives separated by blank lines. The type of directive is determined by the first non-whitespace character on the line, which can be one of the following: % command. Issues a command to the spec file processor.
You need to use %exclude macro, i.e.
%files
%exclude /lib/*.py
%exclude /comm/*.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With