Содержание
Here are some additional explanations for debmake options.
Команда debmake предлагает 2 опции для выполнения быстрых действий.
Действия из примера, приведённого выше в «Глава 5, Simple packaging», можно выполнить с помощью следующей простой команды.
$ debmake -a package-1.0.tar.gz -i debuild
![]() | Подсказка |
|---|---|
|
A URL such as «https://www.example.org/DL/package-1.0.tar.gz» may be used for the -a option. |
![]() | Подсказка |
|---|---|
|
A URL such as «https://arm.koji.fedoraproject.org/packages/ibus/1.5.7/3.fc21/src/ibus-1.5.7-3.fc21.src.rpm» may be used for the -a option, too. |
The debmake command with the -b option provides an intuitive and flexible method to create the initial template debian/control file. This file defines the split of the Debian binary packages with the following stanzas:
The debmake command also sets an appropriate set of substvars (substitution variables) used in each pertinent dependency stanza.
Ниже приводится цитата соответствующей части страницы руководства debmake.
set the binary package specs by a comma separated list of binarypackage:type pairs. Here, binarypackage is the binary package name, and the optional type is chosen from the following type values:
The pair values in the parentheses, such as (any, foreign), are the Architecture and Multi-Arch stanza values set in the debian/control file. In many cases, the debmake command makes good guesses for type from binarypackage. If type is not obvious, type is set to bin.
Here are examples for typical binary package split scenarios where the upstream Debian source package name is foo:
Generating an executable binary package foo:
Generating an executable (python3) binary package python3-foo:
Generating a data package foo:
Generating a executable binary package foo and a documentation one foo-doc:
Generating a executable binary package foo, a library package libfoo1, and a library development package libfoo-dev:
Если содержимое дерева исходного кода не совпадает с настройками поля тип, то команда debmake выводит предупреждение.
This test building scheme is suitable for git repositories organized as described in gbp-buildpackage(7), which uses the master, upstream, and pristine-tar branches.
The upstream snapshot from the upstream source tree in the upstream VCS can be made with the -d option if the upstream supports the «make dist» equivalence.
$ cd /path/to/upstream-vcs $ debmake -d -i debuild
С другой стороны, то же самое можно сделать с помощью опции -t в том случае, если с помощью команды tar можно создать tar-архив основной ветки.
$ cd /path/to/upstream-vcs $ debmake -p package -t -i debuild
Unless you provide the upstream version with the -u option or with the debian/changelog file, a snapshot upstream version is generated in the 0~%y%m%d%H%M format, e.g., 0~1403012359, from the UTC date and time.
If the upstream VCS is hosted in the package/ directory instead of the upstream-vcs/ directory, the «-p package» can be skipped.
If the upstream source tree in the VCS contains the debian/* files, the debmake command with either the -d option or the -t option combined with the -i option automates the making of a non-native Debian package from the VCS snapshot while using these debian/* files.
$ cp -r /path/to/package-0~1403012359/debian/. /path/to/upstream-vcs/debian $ dch ... update debian/changelog $ git add -A .; git commit -m "vcs with debian/*" $ debmake -t -p package -i debuild
This non-native Debian binary package building scheme without the real upstream tarball is considered a quasi-native Debian package. See «Раздел 11.13, «Quasi-native Debian packaging»» for more details.
This is an experimental feature.
The generation of a functioning multi-binary package always requires more manual work than that of a functioning single binary package. The test build of the source package is the essential part of it.
Например, создадим пакет из того же архива package-1.0.tar.gz (см. «Глава 5, Simple packaging») с поддержкой набора из нескольких двоичных пакетов.
Запустите команду debmake с опцией -j для выполнения тестовой сборки и создания отчёта.
$ debmake -j -a package-1.0.tar.gz
Начните работу над пакетом с помощью команды debmake.
$ rm -rf package-1.0 $ tar -xvzf package-1.0.tar.gz $ cd package-1.0 $ debmake -b"package1:type1, ..."
Build the Debian package with the debuild command or its equivalent.
$ debuild
![]() | Примечание |
|---|---|
|
The -j option for the debmake command invokes dpkg-depcheck(1) to run debian/rules under strace(1) to obtain library dependencies. Unfortunately, this is very slow. If you know the library package dependencies from other sources such as the SPEC file in the source, you may just run the "debmake …" command without the -j option and run the «debian/rules install» command to check the install paths of the generated files. |
The debmake command invoked with the -T option additionally prints verbose tutorial comment lines. The lines marked with ### in the template files are part of the verbose tutorial comment lines.
The debmake command invoked with the -B option can generate template files with .bkup suffix. This is handy if you want to see auto-generated template files to the existing ones.
Количество шаблонных файлов, создаваемых командой debmake зависит от опции -x[01234].
![]() | Примечание |
|---|---|
|
Команда debmake не меняет ни один из существующих файлов настройки. |