[Mageia-dev] Looking for a mentor

Michael Scherer misc at zarb.org
Wed Jun 8 00:04:54 CEST 2011


Le mardi 07 juin 2011 à 23:15 +0200, Matteo a écrit :
> On 07/06/2011 22:21, Michael Scherer wrote:
> > 
> > - you should use %configure here instead of ./configure :
> > ./configure --etcdir=%{_sysconfdir} --bindir=%{_bindir} --mandir=
> > %{_mandir} --i18n=1
> > 
> > %configure will enforce some of our compilation flag.
> > 
> I can't change this one, because rpmbuild says:
> 
> cp: manca l'operando per il file di destinazione dopo
> "/home/matteo/rpm/BUILDROOT/axel-2.4-1mga2.i386/"
> Usare «cp --help» per ulteriori informazioni.
> make: *** [install-bin] Errore 1
> errore: Stato d'uscita errato da /home/matteo/rpm/tmp/rpm-tmp.3TlCPV
> (%install)
> 
> 
> Errori di compilazione RPM:
>     Stato d'uscita errato da /home/matteo/rpm/tmp/rpm-tmp.3TlCPV (%install)
> 
> I'm sorry, the output is localized in italian but I think it's quite
> comprehensible that cp is called with wrong arguments and something
> happens I still don't understand very well.
> 
> Using rpm --eval %configure I've seen that the arguments passed to
> configure doesn't fit the arguments expected by the axel configure
> script. How do we deal with this kind of problems?

I guess there is 2 issues :
1) adding a comment to explain why we can't use the usual macro

2) enforce the compilation flag, and that's highly dependent on the
script used. 

OFr this one, I guess we need to push LFLAGS and CFLAGS in
Makefile.settings :
there is line linke this :

        echo 'LFLAGS+=-lintl' >> Makefile.settings;

and the Makefile use CFLAGS ( for compilation options ) and LFLAGS ( for
linker option )

I guess this could do the trick : 
( just after ./configure )

%setup_compile_flags
echo  "LFLAGS+=$LDFLAGS" >> Makefile.settings;
echo  "CFLAGS+=$CFLAGS" >> Makefile.settings;


-- 
Michael Scherer



More information about the Mageia-dev mailing list