tags:

views:

338

answers:

1

I'm trying to use rpmbuild to build x86-64 packages and libs-32bit package.
The same src rpm is uesd to build both output packages.
What is the arguments to rpmbuild to make package-lib-32bit-X.x.x68_64.rpm ?

I currently do this to get a 32-bit package:
CC='gcc -m32' CXX='g++ -m32' linux32 rpmbuild -bb -target=i586 package.spec

That gives me package-lib-X.x.i586.rpm when I need package-lib-32bit-X.x.x86_ 64.rpm .
What arguments get '32bit' added to the package name and named x86_64 ?

+1  A: 

for opensuse
install 'build' rpm

CC='gcc -m32' CXX='g++ -m32' linux32 rpmbuild -bb --target=i586 package.spec
{
echo package
echo package-devel
} > baselib.conf
/usr/lib/build/mkbaselibs -c /usr/lib/build/baselibs_ global.conf -c baselib.conf /PATH_ TO_ RPMS/.../i586/package*.rpm

[editted to add missing second dash '--' on target parameter to rpmbuild]

codeDr
On RHEL 5 at least, the target argument should be `--target` (note the extra hyphen).
bstpierre