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, strip_prefix, package_dir, srcs, mode, modes, deps, 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, conflicts, predepends, recommends)
Create a debian package. See http://www.debian.org/doc/debian-policy/ch-controlfields.html for more details on this.
pkg_rpm(name, spec_file, architecture, version, version_file, changelog, data)
Create an RPM package. See http://rpm.org/documentation.html for more details on this.