Re: A way to use conditionnal blocks in the .rpmmacros file

Jeff Johnson <[email protected]>
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Oct 8, 2007, at 10:18 AM, ELASRI Patrice SOFRECOM wrote:

> Hi,
> Can we use architecture-based conditionals (%ifarch linux ...  
> %endif) blocks within the .rpmmacros file ?

Nope, %ifarch is a parser, not a macro, directive.

Instead, refactor per-arch macros into a  file which is loaded
only on a specific architecture.

See the macrofiles: directive on the last line of /usr/lib/rpm/rpmrc.  
Note
the %{_target} substitution that chooses 1-of-N per-architecture macro
configuration files.

Write a stub rpmrc file with two lines to override the default. The  
two lines
will look like
      include: /usr/lib/rpm/rpmrc
      macrofiles: <whatever paths you want>

Put the rprmrc file in any of the usual places, or invoke rpmbuild  
with --rcfile your_stub_rpmrc_file

73 de Jeff

_______________________________________________
Rpm-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rpm-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.