Jeff Johnson schrieb:
On 12/17/06, Frank Cusack <fcusack@xxxxxxxxxxx> wrote:
Please quote any URL, page#, or spec file where you see '%ifdef' used or
documented. You're probably trying to use a SuSE-specific macro on a
non-SuSE system.
Just for historical accuracy, here's a reference to %ifdef in
/usr/lib/rpm/macros:
Historical? So you mean %ifdes is deprecated?
[reference to %ifdef]
The issue of whether to add %ifdef was discussed at the time build
conditionals
were added to rpm (PLD invented the concept).
It would be possible to create a %ifdef rather easily, but there are
other, and
much harder problems to solve, because %if is not a macro, but rather
a section
marker, that is parsed and handled entirely differently than macros.
Adding a %ifdef construct would only complicate matters because of two
different parsers imho.
The still harder problem is that
Prefix:
parsing is going to add a definition for
%prefix
which is going to be pushed on top of whatever %prefix is configured or
passed from the CLI.
Personally, I solve the whole problem of unifying %prefix and %_prefix
values by doing
Prefix: /usr
%define _prefix %{prefix}
on a per-specfile basis, which achieves the same end goal of unifying
%prefix and %_prefix values without the fuss and muss of testing for
values and existence.
I have solved the problem with
%_prefix {?prefix:%{prefix}}{!?prefix:/usr}
For all other paths like %_sysconfdir I'm using the test command in %().
Okay, it doesn't looks good. But now my life is easier. ;)
Thanks and best regards
Marcus
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list