Le Vendredi 06 Juin 2003 01:01, Stew Benedict a écrit : > On Thu, 5 Jun 2003, Bertrand wrote: > > I've done a very first SRPM for GWorkspace-0.5.1, the gnustep clone of > > the NeXT filemanager. I'm not very sure of my specfile and I've still > > got one problem : it can only compile on PowerPC (so x86 users will > > come after, this time ;-))) ) > > > > My problem is at the beginning of the spec file : > > > > %define host_cpu $GNUSTEP_HOST_CPU > > > > I want to use the GNUSTEP_HOST_CPU environnement variable to list some > > files at the build stage in the %file section of the spec file : > > > > %files %gs_install_dir/Tools/%host_cpu/linux-gnu/gnu-gnu-gnu/findfile > > %gs_install_dir/Tools/%host_cpu/linux-gnu/gnu-gnu-gnu/fopexec > > %gs_install_dir/Tools/%host_cpu/linux-gnu/gnu-gnu-gnu/wopen > > > > > > Problem : when I build the rpm, this fails with the following : > > > > RPM build errors: > > File not found by glob: > > /var/tmp/GWorkspace-0.5.1/usr/GNUstep/System/Library/Libraries/$GNUSTEP_H > >OST_CPU/linux-gnu/gnu-gnu-gnu/libGWorkspace.so* File not found: > > /var/tmp/GWorkspace-0.5.1/usr/GNUstep/System/Tools/$GNUSTEP_HOST_CPU/linu > >x-gnu/gnu-gnu-gnu/findfile http://perso.wanadoo.fr/bertrand.dekoninck/ > > File not found: > > /var/tmp/GWorkspace-0.5.1/usr/GNUstep/System/Tools/$GNUSTEP_HOST_CPU/linu > >x-gnu/gnu-gnu-gnu/fopexec File not found: > > /var/tmp/GWorkspace-0.5.1/usr/GNUstep/System/Tools/$GNUSTEP_HOST_CPU/linu > >x-gnu/gnu-gnu-gnu/wopen > > > > > > So I've replace $GNUSTEP_HOST_CPU by it's value on my system : powerpc. > > Then it builds. But it won't on x86. > > Can someone help me ? > > > > I've placed a srpm on my web space : > > http://perso.wanadoo.fr/bertrand.dekoninck/ > > You'll need a complete gnustep install to build it. > > Bertrand Dekoninck > > > > PS : here's the specfile attached > > Bertrand. There is a macro that might do what you want already: > > rpm --eval=%_host_cpu > powerpc
It is better to use %_target_cpu: [EMAIL PROTECTED] olivier]$ rpm --eval %_target_cpu sparc here on sparc, because on compatible architecture you can get the wrong value: on sparc, we build rpm for sparc and sparc64, %_target_cpu is define to sparc, but I wonder %_host_cpu is sparc64 on some computer. Another mistake can appear if you try to cross-compile the rpm, aka build on a computer for another arch. Well after test I get the reverse: [EMAIL PROTECTED] nanardon]$ rpm --eval %_host_cpu sparc [EMAIL PROTECTED] nanardon]$ rpm --eval %_target_cpu sparc64 Without buildarchtranslate in ~/.rpmrc, strange, strange. -- Linux pour Mac !? Enfin le moyen de transformer une pomme en véritable ordinateur. - JL. Olivier Thauvin - http://nanardon.homelinux.org/