RFC: spec preprocessor
Jakub Bogusz
qboosh at pld.org.pl
Sun May 18 23:44:59 CEST 2003
On Sat, May 17, 2003 at 01:24:26PM +0200, Michal Moskal wrote:
> Hello,
>
> As everyone see bcond syntax in rpm is ugly. A solution to this (and
> maybe few more) problems would be to run spec files through some kind of
> preprocessor. For example:
> #v+
> %bcond foo default_off "foo support"
> %bcond bar default_on "bar support"
> %if foo
> ...
> %else
> ...
> %endif
[...]
> Would be translated to:
>
> #v+
> # --with foo -- build with foo support
> # --without bar -- build without bar support
> %if %{?_with_foo:1}0
> ...
> %else
> ...
> %endif
> %if %{!?_without_bar:1}0
> ...
> %endif
[...]
Well... doesn't look much better to me.
Too little to be the reason for upgrading rpm or preprocessing specs
somewhere else whenever I have to build some packages from post-Ra
resources...
Lack of nested comments was more disturbing.
Maybe implementing %ifdef and %ifndef (to be used instead of
0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many
specs incompatible with rpm from Ra :/
--
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
More information about the pld-devel-en
mailing list