Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1394744
  • 博文数量: 343
  • 博客积分: 13098
  • 博客等级: 上将
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-06 00:35
文章存档

2012年(131)

2011年(31)

2010年(53)

2009年(23)

2008年(62)

2007年(2)

2006年(36)

2005年(5)

分类: 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 rpmdevtools

Then, create the directory structure in your home directory by issuing the command (as a user):

$ rpmdev-setuptree

That’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.spec

If 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.spec

Please note that you should never build RPM packages using root.

阅读(723) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~