RPM Community Forums

Mailing List Message of <rpm-users>

Re: Evaluating macros defined in specfiles

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 03 May 2009 - 03:26:56 CEST
Message-id: <DF97A546-1F18-4270-9908-B2C54FF7D97C@mac.com>

On May 2, 2009, at 9:04 PM, Eric MSP Veith wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hey,
>
> %{expand} is just what I was missing. I can put a construct using  
> that into
> my own macros file to have it at hand. :-)
>

Note also that rpm-5.2 embeds perl with PHP like syntax as in
	%{perl arg1 arg2:perl script here}
all of which will see all defined macros. So you pothentially
could do

	%{perl %{SOURCE1}: %(cat %{__m2rpath})}

(assuming __m2rpath could handle argv[1]like stdin) and other  
bizarreness.

No bleeping clue whether embedding perl is useful (or not), but
the embedding deed is done.

> The only thing that still remains is the 8192b limit. I might be  
> able to
> process the file linewise, though.
>

As sent privately, the limit is likely some multiple of 8192b, not 8192.
I've just forgot what the limit actually is.

73 de Jeff
Received on Sun May 3 03:27:27 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.