Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rpmbuild - setting name of created .rpm

Tags:

rpm

rpmbuild

I've been trying to find out what's the easiest way to set a fixed filename during rpm creation. Can it be set somewhere in .spec file or as rpmbuild parameter? The default name depends on version and release number. Name of my rpm has to be always the same.

thanks

sync

like image 641
sync Avatar asked Mar 15 '10 20:03

sync


1 Answers

Yes, override the %_rpmfilename macro. The default value according to my rpm --showrc is:

%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

So, you could add the following (or similar) to the top of your .spec file:

%define _rpmfilename %%{NAME}.%%{OS}.%%{ARCH}.rpm
like image 116
rjh Avatar answered Sep 21 '22 12:09

rjh