制作你自己的slackware软件包--checkinstall使用详解
时间:2003-10-20
来源:互联网
checkinstall的简介请看realhyg的帖子:
http://www.linuxsir.org/bbs/showthre...threadid=67811
checkinstall现在的最新版本是1.6.0beta2,稳定版本是1.5.3,可以到
http://asic-linux.com.mx/~izto/check...l/download.php
下载pkg包。
下载下来的文件为checkinstall-1.5.3-i386-1.tgz,请用installpkg 安装。
下面以zhcon为例,说明制作的过程。
tar zxvf zhcon-0.2.3.tar
cd zhcon-0.2.3
./configure
make
上面这几步同从源代码编译安装一样,如果不用checkinstall制作slackware软件包,下一步该是make install了。我们要用checkinstall,所以用执行checkinstall代替。
在运行checkinstall之前,要在当前目录下创建一个对这个软件包的描述文件description-pak,但这个文件不是必须的。
cat > description-pak
zhcon-0.2.3
Zhcon is a fast Linux Console Chinese System which supports
framebuffer device.It can display Chinese, Japanese or Korean
double byte characters.Supported language encodings include:
GB2312, GBK, BIG5, JIS and KSC.
另外还可以在当前目录下创建4个特殊的脚本文件preinstall-pak, postinstall-pak, preremove-pak和postremove-pak。
preinstall-pak在被安装之前执行,postinstall-pak在被安装之后执行,preremove-pak在被删除之前执行,postremove-pak在被删除之后执行。同样,这4个脚本文件不是必须的。
如果要制作的软件有一些特殊的要求,比如创建一个特殊的用户或者组,这4个脚本就有作用了。
然后在当前目录下创建一个doc-pak的目录,这个目录是用来存放软件的相关文档的。比如说README, INSTALL, COPYING, Changelog, TODO, CREDITS等文件。这些文件在安装软件包时将被拷到/usr/doc/”软件包名称“目录下。如果你现在不创建,在生成软件包时将提醒你是否创建这个目录和拷贝相关文件,如果你再选择否,那么制作的软件包将没有文档。
下面开始用checkinstall创建软件包了,在执行之前确保你是root用户。执行checkinstall。
checkinstall
如果开始你没有创建doc-pak目录,此时将会提示你是否创建。
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]:
按y自动创建和拷贝,按n取消。
下面checkinstall将创建安装软件包,checkinstall默认安装命令是 make install,你得根据你的软件安装说明具体而定,有些软件的安装命令不是make install,而是其他,你则换成
checkinstall make modules_install
checkinstall install.sh
checkinstall setup
等形式。这样,我们也可以把一些以二进制包发布的软件用checkinstall创建为slackware的软件包,只要再checkinstall后面加上安装指令作为参数即可。
下一步checkinstall将会询问创建什么软件包,
Please choose the packaging method you want to use.
Slackware [S], RPM [R] or Debian [D]?
选择s创建slackware的pkg软件包,选r创建redhat的rpm软件包,选d创建debian的deb软件包。我们选择s继续。
This package will be built according to these values:
1 - Summary: [ zhcon-0.2.3 ]
2 - Name: [ zhcon ]
3 - Version: [ 0.2.3 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i386 ]
8 - Source location: [ zhcon-0.2.3 ]
9 - Alternate source location: [ ]
Enter a number to change any of them or press ENTER to continue:
checkinstall给出一个菜单让你选择修改软件包的一些属性,想修改就按对应的数字键,否则回车继续。我们按7修改软件包的系统平台,
Enter the architecture type:
>> i686
This package will be built according to these values:
1 - Summary: [ zhcon-0.2.3 ]
2 - Name: [ zhcon ]
3 - Version: [ 0.2.3 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ Applications/System ]
7 - Architecture: [ i686 ]
8 - Source location: [ zhcon-0.2.3 ]
9 - Alternate source location: [ ]
Enter a number to change any of them or press ENTER to continue:
然后回车继续,checkinstall将会在当前目录生成制作好的pkg软件包并安装它。
我们的软件包创建到此成功结束。
作者: struggle 发布时间: 2003-10-20
Creates a new Slackware compatible package. The program uses the contents of the current directory to create the package.
在官方网站上看到的,用这个命令可不可以啊?
作者: pingY 发布时间: 2003-12-26
makepkg没试过
作者: nbxmedia 发布时间: 2003-12-26
最初由 pingY 发表 makepkg Creates a new Slackware compatible package. The program uses the contents of the current directory to create the package. 在官方网站上看到的,用这个命令可不可以啊? |
作者: struggle 发布时间: 2003-12-27
作者: 用户名 发布时间: 2003-12-28
我现在还没有slack,像再红旗下编译,可是make事老出错
也不知道是软件的问题,还是红旗的问题
拜托了,谢谢
作者: wjping119 发布时间: 2004-05-26
作者: dreamawake 发布时间: 2004-05-26
作者: hj_18 发布时间: 2004-05-26
作者: dreamawake 发布时间: 2004-05-26
作者: babo 发布时间: 2004-11-14
作者: 鸟儿 发布时间: 2004-11-21
作者: Yanjm 发布时间: 2004-11-21
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28