如何创建具有依赖项的 .deb 文件?

如何创建具有依赖项的 .deb 文件?

我有一个用 LÖVE 框架制作的游戏,我想将其打包成一个.deb文件,以便其他人可以轻松安装并可以通过 Unity dash 轻松找到它。

我也有 LÖVE 框架love_0.7.2.deb,我想以某种方式将其放在 deb 文件中。

我拥有的文件:

game_icon.png
game .desktop
the_game.love
love_0.7.2.deb

有人能向我解释一下如何做到这一点吗?

答案1

为了使一个包依赖于另一个包,你需要在debian/control文件中指定关系。你可以请参阅 Ubuntu 打包指南中的此文件的语法。该指南的其余部分可能会帮助您大致了解 Ubuntu 的打包程序。

简单来说,你的debian/control文件可能看起来像这样:

Source: my-game
Section: devel
Priority: optional
Maintainer: Jane Doe <[email protected]>
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 7)
Homepage: http://www.gnu.org/software/hello/

Package: my-game
Architecture: any
Depends: ${shlibs:Depends}, love (>= 0.7.2)
Description: a game made with the LÖVE framework
 This game is really amazing.
 .
 It has many features.

特别注意这一行:

依赖:${shlibs:Depends},爱(>= 0.7.2)

相关内容