Tuesday, March 25, 2008

Build your own RPM package

I'm sure you don't want to build the software from source for 200 servers in your server farm. You want to do it in a smarter way. Build your own rpm and distribute to your servers is certainly smarter and faster.

I'm using my home directory /home/panda to build the rpm. Firstly, please create the folders in the following structure:

/home/panda/rpm
BUILD RPMS SOURCES SPECS SRPMS

/home/panda/rpm/RPMS
athlon i386 i486 i586 i686 noarch

Put your source code tar ball in the SOURCES directory.

Create .rpmmacros in user home directory /home/panda, with the following text in your macro file:

%_topdir /home/panda/rpm

Then put your spec file in the SPECS folder, run rpmbuild and get a cup of coffee.

rpmbuild -ba rpm/SPECS/bamboo.spec

No comments: