syntax of rpm build dir

lolaferrari
lolaferrari used Ask the Experts™
on
could someone explain what the % mean here? and what this command is doing
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
create a file ~/.rpmmacros with the content of
------
%_topdir %(echo $HOME)/rpmbuild
------

It tell rpmbuild command that the TOPDIR is set to ~/rpmbuild for that user.

Author

Commented:
thanks so much - what do the % mean?
Top Expert 2011
Commented:
It is used by rpmbuild like "$" in shell or perl.
It indicates that %_var or %%{var1} are variables.

Author

Commented:
very informative solution - thank you so much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial