RPM package management-III(Advanced Package MGMT)

0 comments

Creating RPM packages from Source

To start of this topic most of the times RPM packages will come as source file. This have some advantage and disadvantage
first coming to disadvantage there is no direct command to install this source file on linux server so for newbabys it very diffucult to install the packages and coming to advantage we can compile this source packages to what ever platform we want so we are now going to see how to create compiled packages for different platforms from source files
here are the links for my previous RPM management topics. one two.

Step1: To create RPM packages from source we require two packages

gcc compiler
rpm-build

install these two packages

Step2:After installation of above packages install the source package which you want to compile

#rpm -ivh packagename.src.rpm

When we install the above src package we will get .specs file in /usr/src/redhat/SPECS which will contain all the details to create the required.

Step3:Now we got the spec file in order to specify the platform type etc

#cd /usr/src/redhat/SPECS

Step4:Create rpm package

#rpm-build -bb packagename.spec --target i386

this command will build a package which can be installed on i386 platform

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here