linux下的动态链接库(DLL)

如何创建 deb 软件包

yyweii posted @ 2008年5月01日 09:30 in Linux with tags ubuntu package , 3895 阅读

摘录自 creating and distributing deb files written by Andrew Min

创建一个 deb 软件包有多种方式:

1. 使用 CheckInstall
asic-linux.com.mx/~izto/checkinstall/
最简单也是最糟糕的一种方式。你要做就是运行 make 编译源代码,然后运行 checkinstall 创建 deb 软件包。但是这种方式不会安装依赖也不允许你声明依赖。所以用户必须手动安装依赖。
AutoApt   help.ubuntu.com/community/AutoApt
和 AutoDeb   wiki.ubuntu.com/AutoDeb
可能可以解决依赖问题,但他们现在还是带有实验性质的。
关于 checkinstall 的教程:
help.ubuntu.com/community/CheckInstall

2. 使用 Debian Package Tools FE
url.fullcirclemagazine.org/927dc1
一个基于 Qt 的带界面的工具,比 checkinstall 好,但也不是很理想。

3. 手动创建软件包


第一步: 编译安装软件

第二步: 创建 control 文件。
下面是一个 control 文件的例子:

Package: fungame
Version: 1.0
Section: games
Priority: optional
Architecture: i386
Essential: no
Depends: libfungame, gamelibrary (>=1.4.0)
Recommends: fungamesaves1 | fungamesave2
Suggests: optionalfungame
Installed-Size: 1024
Maintainer: Game Maker[gamer@gamers.net]
Conflicts: stupidfungamethatbreaksthisone
Replaces: oldfungame
Description: A short description of the program. A longer description
                                                <-------这空行是必须的!


这个文件很好理解,下面对各项分别加以说明:

软件包名字(Package)只能使用小写字母、数字、和"+"、"-"。版本(Version)里不能包含"-"。分类(Section)里可以使用 admin, games, gnome, kde, mail, misc, net, sound, text, utils 和 web。优先级(Priority)大多数时候是 optional。架构(Architecture)可以是 i386, AMD64, PowerPC 等。必要(Essential)说明此软件包是否是必须的,大多数时候不是必须的。

依赖(Depends)、推荐(Recommends)、建议(Suggests)这三项是相似的,软件包名之间用逗号分隔,也可以使用管道(|),表明“或”的关系。你也可以在括号里指定软件包版本号, << 小于,<= 小于等于,= 等于,>= 大于等于,>> 大于。

安装大小(Install-Size)表明软件安装后的大小,单位 kb。维护者(Maintainer),你的名字后加[你的 email ]。冲突(Conflicts),一些与之冲突的软件包名。替换(Replaces),此软件包将会替换的软件包名。

第三步: 复制程序和创建链接
假设工作目录是 ~/fungame/,把 control 文件保存于 ~/fungame/DEBIAN/。检查 makefile 文件,看一下程序被安装到了哪里,然后把这些程序复制到工作目录的相应目录里。

例如: ---> 表示 复制到
/usr/local/fungame/ ---> ~/fungame/usr/local/fungame/
/usr/bin/fungame ---> ~/fungame/usr/bin/
你也可以在 ~/fungame/usr/share/applications/ 下创建一个 fungame.desktop 文件,用来创建链接。
下面是一个 desktop 文件的简单例子:
 

[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Fun Game
Exec=fungame
Comment=
Icon=/usr/local/fungame/fungame.png
Terminal=false
Categories=Application;Game;
StartupNotify=false
MimeType=


第四步: 创建 deb 软件包
cd 切换到你要保存 deb 软件包的目录,使用如下命令:
 

dpkg -b directory packagename.deb

directory 是包含 DEBIAN/ 的目录(~/fungame/)
packagename 应该遵循 软件名_版本号_架构.deb 的命名习惯。

residential cleaning 说:
2021年9月24日 20:25

Maids will help you to handle these tasks. You may hire them just for this move-in kind of service if that's all that's necessary. On another hand, you may hire them to return after you have moved set for long-term, regular care of the house. As the busy expert, you don't have the time for you to put into this method by yourself, but you are able to still obtain help for that cleanup much more quickly than you understand.

PAN India meaning 说:
2022年8月09日 15:29

PAN is abbreviated as Presence Across Nation and is operating or available at every possible location. A mark of PAN India is given to an organization or firm or company if their entity or branches are spread across every state and their customers can avail of their services from anywhere in India. PAN India meaning If any company operates at one location at the start and has spread its branches to various cities of India, then that company can use the recognition to announce its company growth.

Uttarakhand Board Qu 说:
2022年8月30日 15:25

UK Board 10th Previous Question Paper are very important for the Preparation of Public Exam of UBSE for the Students. 10th Students of can easily get their Latest and most valuable Mock Test Paper from this website. Uttarakhand Board Question Paper Students only have to Download the UBSE 10th Mock Test Paper 2023 for all the important subjects are available Including the Hindi, English, Social Science, Mathematics, Science, Home Science, Sanskrit, Painting etc. Boardmodelpaper.com Provide UBSE Board 10th Class Latest and Last Year Exam Study Material for Syllabus, Question Paper etc, Hindi, English Medium Pdf Format.

Paytm Bank MICR Code 说:
2022年10月27日 00:35

Digital money transfer is a common practice globally. Today people prefer fast and convenient, and safe money transaction channels. Paytm is a popular online money transfer platform, which operates globally and gives the ease of sending and receiving money. Paytm Bank MICR Code The Paytm Payment Bank IFSC code is a unique 11 digit alphanumeric code. It's used for online money transactions, such as sending money to a bank account. Using online payment systems through smart devices.

AEPS Agent Login 说:
2022年11月03日 23:25

The Spice Money is a versatile organization in India that provides various services from fund transfer to tour and travel. The service is an Aadhaar enabled payment system (AEPS)which allows registered users to transact funds easily. AEPS Agent Login Spice Digital established spice money to offer utility payment and tour and travel services, Aadhaar mini ATMs, buying and paying insurance premiums, selling and buying gold, plus more services.

Tnvelaivaaippu 说:
2022年11月04日 21:29

Employment is what everyone hopes to get after long years of study and hard work. Students have different plans after school, where some start a business while others opt for employment in the public and private sectors. Tnvelaivaaippu In Tamil Nadu state India, the state government has taken the initiative to assist students who have long search for work to no avail. The government has introduced a scheme that caters to unemployed students from backward communities.

Jaa Lifestyle Login 说:
2023年1月23日 14:20

Jaa Lifestyle is a money-earning website that has its roots in the United Kingdom. The Jaa Lifestyle is not fully open in India, but still, an individual can try to get a glance at services from the website. Jaa Lifestyle Login Id And Password They offer some new ways to earn money by involving individuals in different activities. There are referral programs and other games in Java Lifestyle, which are available to earn money. An individual has to fully get involved in the activities and has to win the game to earn money.

FMS BSNL 说:
2023年2月07日 00:35

BSNL being traditional player and has many franchisees working under it. To establish a platform to all the franchisees or TIPs who is known as Telecom Infrastructure Providers, FMS BSNL make them work with ease, an online software tool calls BSNL Franchise Management System is being provided to manage their BSNL Bharat Fiber customer data base, for respective business and to get new business.

Blueprint 2024 for 1 说:
2023年2月15日 18:36

Board of Secondary Education board will soon declare CBSE 10th Blueprint 2024 through its official website. Blueprint 2024 for 10th CBSE board will declare its Central Board of Secondary Education 10th Blueprint 2024 in the month of May this year and this board published the notification regarding the examinations of class 10th and after a few time in the month of March exams were started from March. In the previous academic session also Paper 2024.

bravotv.com link act 说:
2023年7月11日 23:30

The activation code will appear on the TV screen when the streaming device has been connected. To enter the activation code, go to official website. First, you must log in to your TV provider and then select the Activate Now option to begin the activation procedure. bravotv.com link activation code Users may log in to the Bravo TV channel on their Smart TV or streaming device with this code and the service is now available on Android, Roku, Amazon Fire TV, Apple TV, iOS devices, computers, tablets, and Smart TVs.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter