2

How to pass the location of .rpmmacros file in rpmbuild command ?

by default it try to look for it in home dir.

I tried -rcfiles /location/to/.rpmmacros but it gave me

error: missing ':' (found 0x2f) at /usr/local/.rpmmacros:1

content of .rpmmacros

%_topdir       /usr/path/
Bhuvan
  • 4,028
  • 6
  • 42
  • 84

2 Answers2

0

Hmm... Am not an expert myself, but shouldn't it be --rcfil=location_to_rpmrc

And the rpmrc file should contain the path to rpmmacros in the format

macrofiles::full_path_to_rpmmacros_file

  • I suggest you add some code blocks to make your comment easier to read. Also, using punctuation would be great. – Chris Leyva Dec 19 '13 at 18:21
0

With RPM version 4.12.0.1, you can specify the rpmmacro file as follows: rpmbuild --macros=<YOUR_LOCAL_MACRO> <YOUR_LOCAL_SPEC_FILE>

after replacing and with corresponding path to your files.