[CentOS] Building a 64bit rpm

S.Tindall tindalls.gr9x at osccc.com
Tue Apr 8 18:25:11 UTC 2008


On Tue, Apr 08, 2008 at 1:48 PM,  Akemi Yagi wrote:
> On Tue, Apr 8, 2008 at 10:34 AM, Frank Cox wrote:
>> On Tue, 08 Apr 2008 19:29:01 +0200, Rudi Ahlers wrote:
>>
>>  Use yum to install rpmdevtools.  Then rpmdev-setuptree will do all of the work
>>  that's required to build rpms as a user.
> 
> I suppose rpmdevtools is only available from EPEL.  But the following
> procedures will do the job:
> 
> cd
> mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
> echo "%_topdir %(echo $HOME)/rpmbuild" > .rpmmacros
> 
> Then as root, yum install rpm-build
> 
> Akemi

Adding to Rudi Ahlers's & Akemi's suggestions, also define the distro while you are at it (.el4, .el5, etc.):

$ rpmdev-setuptree

$ echo "%dist .el5" >> ~/.rpmmacros 

$ cat ~/.rpmmacros

%_topdir      %(echo $HOME)/rpmbuild
%_smp_mflags  -j3
%__arch_install_post   /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot
%dist .el5


Steve Tindall



More information about the CentOS mailing list