[CentOS] Building rpm-s from binaries

Fri Aug 10 14:18:32 UTC 2007
Johnny Hughes <johnny at centos.org>

Tomasz Napiera?a wrote:
> Thanks for response.
> 
> On Friday 10 August 2007 14:45:31 James Pearson wrote:
>> The 'noarch' rpms normally don't build anything - so they could be a
>> good starting point - the crontabs spec file is a simple example -
>> although if you are generating platform specific RPMS, you won't want
>> the 'BuildArchitectures: noarch' line.
> 
> 
> 
> That's another question though. I need to build separate packages for 4 archs. 
> Whuile it's pretty easy to do it while compilind, I'm not sure about binary 
> only packages. Any partucular problems I should be aware of?

Also, just in case the others have not made it clear .. you will create
a tarball of your binary files in a file named <name>-<version>.tar.bz2
and spec file.  You will make that your SRPM with rpmbuild -bs, and
build it to your binaries with rpmbuild -bb.

It needs to extract to <name>-<version> in the BUILD directory (%setup
will do that).

Then you just need to have an %install section that puts files where you
want it to go on the machine.

You can have a different directory under <name>-<version> for each arch
and use %ifarch as suggested earlier.

Also, the example SRPMS already relayed by other people in this thread
are good to see the processes.

Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20070810/464a6bd3/attachment-0005.sig>