LUPA首页
|
资讯
|
教程
|
下载
|
求职
|
方案
|
博客
|
交易
|
英文版
游客:
注册
|
登录
|
会员
|
统计
|
帮助
LUPA论坛
»
高校教学认证专版
»
技术支持
» 实例说明:利用工具方便、快捷的生成RPM与DEB包
‹‹ 上一主题
|
下一主题 ››
投票
交易
悬赏
活动
打印
|
推荐
|
订阅
|
收藏
|
开通个人空间
|
加入资讯
标题: 实例说明:利用工具方便、快捷的生成RPM与DEB包
本帖已经被作者加入个人空间
zhull1052
开源主力军
UID 73681
精华 0
积分 1441
帖子 117
LUPA币 1382 点
阅读权限 30
注册 2007-10-19
#1
发表于 2008-5-11 17:11
资料
个人空间
短消息
实例说明:利用工具方便、快捷的生成RPM与DEB包
操作1:
工具包的下载
下载地址:
http://asic-linux.com.mx/~izto/checkinstall/files/rpm/checkinstall-1.6.1-1.i386.rpm
操作2:
安装工具包
[root@localhost home]#rpm –ivh checkinstall-1.6.1-1.i386.rpm
操作3:
源码文件内容
[root@localhost hello]# ls
aclocal.m4 configure description-pak Makefile.am pics
autom4te.cache configure.in hello.c Makefile.in
autoscan.log configure.scan hello.h missing
config.h.in depcomp install-sh mkinstalldirs
操作4:
配置源码文件
[root@localhost hello]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
操作5:
编译源码
[root@localhost hello]# make
make all-am
make[1]: Entering directory `/home/hello'
source='hello.c' object='hello.o' libtool=no \
depfile='.deps/hello.Po' tmpdepfile='.deps/hello.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c `test -f 'hello.c' || echo './'`hello.c
gcc -g -O2 -o hello hello.o
make[1]: Leaving directory `/home/hello'
操作6:
生成RPM包或DEB包
[root@localhost hello]# checkinstall #此处也可以输入命令checkinstall -R直接生成RPM
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The checkinstallrc file was not found at:
/usr/local/lib/checkinstall/checkinstallrc
Assuming default values.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
准备软件包的文档……OK
*** No known documentation files were found. The new package
*** won't include a documentation directory.
Please choose the packaging method you want to use.
Slackware [S], RPM [R] 还是 Debian [D]?R #R表示生成RPM包,D表示生成DEB包
**************************************
**** RPM package creation selected ***
**************************************
This package will be built according to these values:
1 - Summary: [ hello-1.0-3.tar.gz ]
2 - Name: [ hello ]
3 - Version: [ 1.0 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ hello ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ hello ]
输入一个数字来改变它们,或按回车键继续:
1
#此为输入要修改的行号,如1表示设置summary内容
Enter new summary:
>> hello for linux提
#输入设置或修改的内容
This package will be built according to these values:
1 - Summary: [ hello for linux ]
2 - Name: [ hello ]
3 - Version: [ 1.0 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ hello ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ hello ]
输入一个数字来改变它们,或按回车键继续:4
Enter new release number:
>> 3
This package will be built according to these values:
1 - Summary: [ hello for linux ]
2 - Name: [ hello ]
3 - Version: [ 1.0 ]
4 - Release: [ 3 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ hello ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ hello ]
输入一个数字来改变它们,或按回车键继续:
Installing with make install...
========================= Installation results ===========================
make[1]: Entering directory `/home/hello'
/bin/sh ./mkinstalldirs /usr/local/bin
/usr/bin/install -c hello /usr/local/bin/hello
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/hello'
======================== Installation successful ==========================
cp:是否覆盖‘//var/tmp/LolgSDErNJnkWFcigqHAF/newfiles’? y
把文件拷贝到临时目录……OK
Striping ELF 二进制文件……OK
压缩 man 手册页……OK
创建文件列表……rm:是否删除一般文件‘/var/tmp/LolgSDErNJnkWFcigqHAF/newfiles’? y
OK
mv:是否覆盖‘/var/tmp/LolgSDErNJnkWFcigqHAF/newfiles.tmp’? y
创建 RPM 包……OK
NOTE: The package will not be installed
删除临时文件……OK
删除 doc-pak 目录……OK
生成备份包……OK
删除临时目录……OK
**********************************************************************
Done. The new package has been saved to
/usr/src/redhat/RPMS/i386/hello-1.0-3.i386.rpm
You can install it in your system anytime using:
rpm -i hello-1.0-3.i386.rpm
#此时就生成了rpm包了
**********************************************************************
[广告]
推荐个超酷的web2.0相册
投票
交易
悬赏
活动
LUPA论坛
专题指导
> 内核问题答疑
> FreeBSD专版
LUPA论坛
> 开源思想交流
> 人物专栏
> LUPA足迹
> 推进员之家
> 网页标准化
> 投稿区
> 技术交流
> 初级问答[新手区]
> 有奖评书专区
> 社区茶馆
> 美景美图
> 创业就业
> 游戏专版
> IT界评论
> 技术文档
> Linux基础
> 跨平台应用
> ErLang专区
> 软件应用
> LAMP专区
> Shell编程
> JAVA
> 高级应用
> PHP
> 邮件服务器
> 嵌入式开发
> 数据库
> FTP技术
> 网络安全
> Solaris专区
> 其他Unix系列
> windows平台开源软件介绍
> 其他编程语言
> 高校教学认证专版
> 认证公告和教学指导
> 技术支持
> 操作员认证专题
> 网管员认证专题
> LAMP工程师认证专题
> 社区管理
> 社区活动
> LUPA基金会
> 开源社区广告同盟
> 人员调整公告
> 回收垃圾
Linux平台开发专版
> C/C++语言基础
> 开发工具使用
> GTK/QT图形库
> 开发包调用
> 软件包制作
合作专区
> 开源项目合作建设
> X-Vake威客系统
> Serious Game底层引擎
> 蓝迪游戏
> ExtMail
> WiseReal教育软件
> Works.lt信息化平台
> LGsearch桌面搜索
> FireFox插件开发
> LUPA考试系统
> Linuxer电子杂志
> Easyjf专版(简易JAVA框架)
> 恩信ERP
> 希瑞CRM
> Zen Cart购物车
> Klinux 发行版定制
当前时区 GMT+8, 现在时间是 2008-7-21 02:51
浙ICP备06002895号
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.035481 second(s), 7 queries , Gzip enabled
TOP
清除 Cookies
-
联系我们
-
LUPA开源社区
-
Archiver
-
WAP
控制面板首页
编辑个人资料
积分交易
公众用户组
好友列表
基本概况
流量统计
客户软件
发帖量记录
论坛排行
主题排行
发帖排行
积分排行
在线时间
管理团队
管理统计