4

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 ?

codeDr
  • 1,535
  • 17
  • 20
  • Naive solution: rename it yourself ;-) – Zifre Jul 03 '09 at 19:54
  • Renaming the rpm file does nothing for the name of the package inside of the file, and how it appears in the rpm database. – codeDr Jul 06 '09 at 18:45
  • I'm not sure exactly why you need to do this - on most (x86-64) Linux distros the 32-bit package is named something like package-x.y-z.i686.rpm - i.e. the architecture is i686, not x86_64. – DaveR Jul 06 '09 at 22:39
  • I've not done a survey of the distros, but on opensuse, the package is called this way. – codeDr Jul 07 '09 at 13:12

1 Answers1

6

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
  • 1,535
  • 17
  • 20