How to use regexp in RPM SPEC file?

I would like to specify the files to be included in my package using regex or find output.

How can i do this?

TIA

+3
source share
1 answer

You can use the directive '-f'for %filesto get a list of files that will be included in the file. This way you can generate files to be included at the end of the section.%install

...
%install
...

find %{buildroot} -regex '.*a$' > file-lists

%files -f file-lists
...
+4
source

All Articles