用于x86-64的rpmbuild 32位lib包

时间:2022-11-19 02:54:42

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 ?

我正在尝试使用rpmbuild来构建x86-64包和libs-32bit包。使用相同的src rpm来构建两个输出包。 rpmbuild创建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

我目前这样做是为了得到一个32位的软件包: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 ?

当我需要package-lib-32bit-X.x.x86_64.rpm时,这给了我package-lib-X.x.i586.rpm。什么参数将“32位”添加到包名称并命名为x86_64?

1 个解决方案

#1


for opensuse
install 'build' rpm

对于opensuse安装'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

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]

[编辑为在目标参数上添加缺少的第二个短划线' - '到rpmbuild]

#1


for opensuse
install 'build' rpm

对于opensuse安装'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

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]

[编辑为在目标参数上添加缺少的第二个短划线' - '到rpmbuild]