27.08.2010 13:58, Ralf Corsepius пишет:
On 08/27/2010 10:28 AM, Pavel Alexeev (aka Pahan-Hubbitus) wrote:
$ rpmdev-newspec -t perl produce template where, inter alia we have such lines: %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
I'm wonder why there used mix of macros %{__perl} and plain other commands like make? Rpm say it is just perl command with path: $ rpm --eval '%{__perl}' /usr/bin/perl Is there any advantage for that?
You are missing the point:
%__perl is being used to derive a whole zoo of %defines, which required to keep perl-module packages consistent - make doesn't.
E.g. all perl-module packages something similar to this:
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) ... %{__perl} Makefile.PL INSTALLDIRS=vendor ... %{perl_vendorlib}
Also we have Review Guidelins which say usage of macroses should be consistent -
Correct ... when using one macro, it must be used consistently throughout a *.spec, otherwise your package will not build correctly should a macro change.
In other words, when using %__perl, you must use it everywhere inside of your *.spec. As %__perl is being used inside of the default rpm macros, not using %__perl almost always will be wrong.
Ok, but why not use plain perl?
Ralf