我已按照以下建议安装了 dh-make这一页依赖于它(我列出了所有可以安装它的软件包,因为我不确定是哪一个):
sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file
并运行它:
dh_make
在我的文件夹所在的目录中包含我的 bash 脚本(文件夹的名称基于模板<packagename>-<version>
),但现在它给了我这些选项:
Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
[s/i/m/l/k/n]
当我打包 bash 脚本时,我该选择哪一个?它们都是什么意思?
操作系统信息:
Description: Ubuntu 14.10
Release: 14.10
封装信息:
dh-make:
Installed: 1.20140617
Candidate: 1.20140617
Version table:
*** 1.20140617 0
500 http://gb.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
100 /var/lib/dpkg/status
答案1
选项的描述均在man dh_make
:
Single binary (s)
The package will generate a single binary .deb package. It is
the standard case, so if you don't know what to do, choose this.
Arch-Independent (i)
The package will generate a single package that is arch-
independent.
Multiple binary (m)
The package will generate multiple binary .deb packages from one
source package. Choose this for larger packages that need to be
split.
Library (l)
The package will generate at least two binaries. One library
package containing just the lib in /usr/lib and another
*-dev_*.deb package containing documentation and C headers.
Kernel module (k)
The package will generate a binary-all kernel module -source
package for use with the make-kpkg(1) command. It also generates
a binary package for additional utilities, daemons, etc. that
may come with the source.
Kernel patch
The package will generate a package that can be used for kernel
patches.
- 对于单个程序,您通常会使用
s
,但在您的情况下,它是一个 shell 脚本,它不依赖于目标系统的体系结构,因此挑选i
。 - 对于
m
(多个二进制文件),它将生成多个包(例如,各种vim
包,它们都是从同一个源包生成的)。