Replace one command with another during make build

0

I build some application with cmake and make all package commands. During the build the rpmbuild program is implicitly called by cpack as part of the build. I need it to call setarch i686 rpmbuild instead of just rpmbuild. How do I accomplish this in a neat way without ugly hacks?

vkrzv

Posted 2013-12-05T07:54:11.290

Reputation: 103

Answers

0

Use a shell alias. For example:

alias rpmbuild="setarch `uname -m` rpmbuild"

Or whatever you need on the right side.

fede.evol

Posted 2013-12-05T07:54:11.290

Reputation: 1 718

Does an alias work from within cpack???? – MariusMatutiae – 2013-12-05T08:22:54.907

It didn't work for me. – vkrzv – 2013-12-05T12:48:46.643