Here, the Debian package is built from three pkg_tar
targets:
bazel-bin
creates a tarball with the main binary (mode 0755
) in /usr/bin
,bazel-tools
create a tarball with the base workspace (mode 0644
) to /usr/share/bazel/tools
; the modes
attribute let us specifies executable files,debian-data
creates a gzip-compressed tarball that merge the three previous tarballs.debian-data
is then used for the data content of the debian archive created by pkg_deb
.
pkg_zip
.docker_build
rule.pkg_tar(name, extension, data_path, directory, files, mode, modes, tars, debs, symlinks)
Creates a tar file from a list of inputs.
pkg_deb(name, data, package, architecture, maintainer, preinst, postinst, prerm, postrm, version, version_file, description, description_file, built_using, built_using_file, priority, section, homepage, depends, suggests, enhances, predepends, recommends)
Create a debian package. See http://www.debian.org/doc/debian-policy/ch-controlfields.html for more details on this.