如何创建 .deb package

来源:互联网 发布:未闻花名知乎 编辑:程序博客网 时间:2024/05/01 09:47

注:源码使用连接地址里面提供的


1.前提环境

命令:

sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuildersudo apt-get install build-essential devscripts ubuntu-dev-tools debhelper dh-make diff patch cdbs quilt gnupg fakeroot lintian  pbuilder piuparts


2.源码准备与"Debianization"

命令:

mkdir ~/hellocd ~/hellowget http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gztar zvxf hello-2.6.tar.gzcd hello-2.6dh_make -e your.maintainer@address

命令执行完后会出现如下信息:

Type of package: single binary, multiple binary, library, kernel module or cdbs?[s/m/l/k/b] sMaintainer name : Your NameEmail-Address   : your.maintainer@addressDate            : Thu,  6 Apr 2006 10:07:19 -0700Package Name    : helloVersion         : 2.6License         : blankType of Package : SingleHit <enter> to confirm: Enter

完了之后会在“hello-2.6”目录下出现"debian"目录,此目录下包含如下文件:changelogcopyright control.


3.修改debian目录下文件

修改 control文件中的"Build-Depends"时可以使用

命令:

dpkg-depcheck -d ./configure

详细步骤略.(见参考地址)


4.建立真正的.debpackage

命令:

dpkg-buildpackage -rfakeroot

5.检查新创建的.deb.

命令:

lintian -Ivi ../yourpackage.changes


参考地址:

http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html点击打开链接

https://wiki.ubuntu.com/PackagingGuide/Complete#Common_Mistakes点击打开链接


原创粉丝点击