全部博文(343)
分类: LINUX
2012-07-19 23:26:44
Things You Need To Do Once
There are a couple of thing you need to do before starting building your RPMs. These mainly include the installation of the core development tools and the creation of the building environment for your user.
Install the core development tools using YUM. As root:
# yum groupinstall "Development Tools"Next, create the building environment for your user. Fortunately, Fedora includes some neat utilities that greatly simplify this procedure. First, use YUM to install them (as root):
# yum install rpmdevtoolsThen, create the directory structure in your home directory by issuing the command (as a user):
$ rpmdev-setuptreeThat’s it.
Build That RPM!
Provided that you have a SPEC file for your program, you can build the binary RPM package by issuing the command:
$ rpmbuild -bb --clean myprogram.specIf you need to build the package for a different architecture, you can set the --target option, like in the example below:
$ rpmbuild -bb --clean --target i686 myprogram.specPlease note that you should never build RPM packages using root.