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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux