-1

I'm trying to create an RPM of some software we have from an external entity. THey provide us with tarballs of 32bit binaries, and 64bit binaries.

I'm wondering what is the best way to create a spec file which could handle both types of binaries.

I tried something like :

%prep
%ifarch i686
    # Use Source0 (32bit)
    %setup -c -T -a 0
%endif

%ifarch x86_64
    # Use Source1 (64bit)
    %setup -c -T -a 1
%endif

But this is giving me back : + %setup -c -T -a 1 /var/tmp/rpm-tmp.67731: line 25: fg: no job control error: Bad exit status from /var/tmp/rpm-tmp.67731 (%prep)

I'm guessing this is due to the -a option given to %setup, which I believe means "change directory first, then extract source $arg1.

Is there a better way to do this?

Dan D.
  • 73,243
  • 15
  • 104
  • 123

1 Answers1

0

I am not sure what is contained in your Source0 or Source1, but likely they are not tarballs so I see no reason to call %setup. Instead work with them like this:

%prep
#no %setup
%ifarch i686
  #use %{SOURCE0}
%endif

%ifarch x86_64
  #use %{SOURCE1}
%endif
Stan
  • 2,487
  • 18
  • 27