Friday, October 22, 2010

BUILDING RPMs

creating a RPM in fedora 13.
RPMs are the binary packages that Red Hat, Fedora, Suse and other distros use to install software. In most cases you can find a rpm packages somewhere on the web but for those rare occasions where you can only find the tar.gz source code than you can simply compile it using ./configure, make, make install.
I build a software "phpMyAdmin" because phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields.

So,To begin the procedure reauried a rpm package
rpm-build
rpmdevtools
rpmlint

root#yum install rpm-build rpmdevtools

After, created a directory to do all work.

user#rpmdev-setuptree

Delelted a source from the directory to do all work.
user#rpmdev-wipetree

Firstly,I need the source rpmfile.
user#yumdownloader --source phpMyAdmin
Source in ~/rpmbuild/SOURCES

secondly,I install the source rpm
user#rpm -i phpMyAdmin-3.3.7-1.fc13*.src.rpm

Rebuild on local machine
takes a source RPM as input, prodece binary and source RPMs
user#rpmbuild --rebuild phpMyAdmin-3.3.7-1.fc13.src.rpm

Building from the spec file
takes a specfile and source code as input, produces binary and source RPMs as output
in ~/rpmbuild/SPECS

user#rpmbuild -ba phpMyAdmin.spec
I will try to build spec file that had no problem because display exot code was 0.

No comments:

Post a Comment