Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a shell command in RPM spec file?

Tags:

rpm

rpm-spec

How do I run a shell command in spec file? I want to execute something similar like:

uname -r | sed s/(...stuff...)/(...stuff...)
like image 454
Amumu Avatar asked May 21 '12 08:05

Amumu


1 Answers

If you need it in something like a %define or %global or a macro, you can use "%(shell_command)". Note () not {}.

like image 112
Aaron D. Marasco Avatar answered Oct 28 '22 11:10

Aaron D. Marasco