macos 如何在 Mac OS X 上创建 .deb 包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3989466/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:18:00  来源:igfitidea点击:

How to create .deb packages on Mac OS X

macosdebdpkg

提问by Zeeshan

I am trying to upload my app on Cydia and it requires .deb package. I am unable to figure out how to make .deb packages on mac. I am using 10.6.3 when I write this command on terminal

我正在尝试在 Cydia 上上传我的应用程序,它需要 .deb 包。我无法弄清楚如何在 mac 上制作 .deb 包。我在终端上写这个命令时使用的是 10.6.3

dpkg-deb -b MyProgram

Terminal output is

终端输出是

-bash: dpkg-deb: command not found

I've install fink, Mac ports insert Mac DVD to find out but nothing helps.

我已经安装了 fink,Mac 端口插入 Mac DVD 来查找但没有任何帮助。

采纳答案by Zeeshan

I installed mac ports 1.7 through terminal as no package is available.

我通过终端安装了 mac 端口 1.7,因为没有可用的软件包。

After that I installed Mac ports 1.9 through installer.

之后,我通过安装程序安装了 Mac 端口 1.9。

Then goto this path /opt/local/binand run sudo port selfupdate

然后转到此路径/opt/local/bin并运行sudo port selfupdate

after that execute sudo port install dpkg

之后执行 sudo port install dpkg

it will take some time and after that your dpkg is successfully configured.

这将需要一些时间,之后您的 dpkg 已成功配置。

Run this command sudo dpkg-deb -b MyProgramto make MyProgram.deb

运行此命令sudo dpkg-deb -b MyProgram使 MyProgram.deb

Note MyProgram should contain DEBIAN folder and under that control file remove txt extention

注意 MyProgram 应包含 DEBIAN 文件夹,并在该控制文件下删除 txt 扩展名

Below is control file

下面是控制文件

Website: www.zeeshanullah.com
Maintainer: zeeshanullah <[email protected]>
Name: Snapture
Package: zeeshanullah
Section: zeeshanullah
Version: 2.x.x
Architecture: iphoneos-arm
Description: GPS joke.
Sponsor: zeeshanullah.com <zeeshanullah>

dont forget to place a new line at the end of control file otherwise you will get an error.

不要忘记在控制文件的末尾放置一个新行,否则你会得到一个错误。

回答by Nate Symer

It's available on Homebrew:

它在 Homebrew 上可用:

brew install dpkg

brew install dpkg

If you don't have Homebrew installed, go to brew.sh. It's a simple one-liner to install.

如果您没有安装 Homebrew,请转到brew.sh。这是一个简单的单线安装。

Homebrew is less invasive, less complicated, and more popular than Macports or similar.

与 Macports 或类似软件相比,Homebrew 的侵入性更小、更简单且更受欢迎。

回答by Comic Sans

You need Xcode installed on your system before using mac ports - you find it on the second mac DVD, I think. After that, you can install mac ports and then via the Terminal type "sudo port install dpkg", press return and enter your password. It may take some time to compile. You tried that?

在使用 mac 端口之前,您需要在系统上安装 Xcode - 我想您可以在第二张 mac DVD 上找到它。之后,您可以安装 mac 端口,然后通过终端输入“sudo port install dpkg”,按回车键并输入您的密码。编译可能需要一些时间。你试过吗?

回答by xbeta

Best option is to use FPM and you can create it in 50 secs: fpm

最好的选择是使用 FPM,你可以在 50 秒内创建它: fpm

回答by Maxim Kholyavkin

i think these links can be useful for you:

我认为这些链接对您有用:

How to make a deb on mac

如何在 mac 上制作 deb

Using ant to create deb

使用 ant 创建 deb