diff --git a/doc_build/common.md b/doc_build/common.md index d2be5edb..7933de10 100644 --- a/doc_build/common.md +++ b/doc_build/common.md @@ -8,9 +8,9 @@ These attributes are used in several rules within this module. | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :-------------: | :-------------: | :------------- | -| out | Name of the output file. This file will always be created and used to access the package content. If `package_file_name` is also specified, `out` will be a symlink. | String | required | | -| package_file_name | The name of the file which will contain the package. The name may contain variables in the forms `{var}` and $(var)`. The values for substitution are specified through `package_variables` or taken from [ctx.var](https://bazel.build/rules/lib/ctx#var). | String | optional | package type specific | -| package_variables | A target that provides `PackageVariablesInfo` to substitute into `package_file_name`. | Label | optional | None | +| out | Name of the output file. This file will always be created and used to access the package content. If `package_file_name` is also specified, `out` will be a symlink. | String | required | | +| package_file_name | The name of the file which will contain the package. The name may contain variables in the forms `{var}` and $(var)`. The values for substitution are specified through `package_variables` or taken from [ctx.var](https://bazel.build/rules/lib/ctx#var). | String | optional | package type specific | +| package_variables | A target that provides `PackageVariablesInfo` to substitute into `package_file_name`. `pkg_zip` and `pkg_tar` also support this in `package_dir` | Label | optional | None | | attributes | Attributes to set on entities created within packages. Not to be confused with bazel rule attributes. See 'Mapping "Attributes"' below | Undefined. | optional | Varies. Consult individual rule documentation for details. | See diff --git a/docs/latest.md b/docs/latest.md index fd92c0a2..6d6e4a55 100755 --- a/docs/latest.md +++ b/docs/latest.md @@ -37,9 +37,9 @@ These attributes are used in several rules within this module. | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :-------------: | :-------------: | :------------- | -| out | Name of the output file. This file will always be created and used to access the package content. If `package_file_name` is also specified, `out` will be a symlink. | String | required | | -| package_file_name | The name of the file which will contain the package. The name may contain variables in the forms `{var}` and $(var)`. The values for substitution are specified through `package_variables` or taken from [ctx.var](https://bazel.build/rules/lib/ctx#var). | String | optional | package type specific | -| package_variables | A target that provides `PackageVariablesInfo` to substitute into `package_file_name`. | Label | optional | None | +| out | Name of the output file. This file will always be created and used to access the package content. If `package_file_name` is also specified, `out` will be a symlink. | String | required | | +| package_file_name | The name of the file which will contain the package. The name may contain variables in the forms `{var}` and $(var)`. The values for substitution are specified through `package_variables` or taken from [ctx.var](https://bazel.build/rules/lib/ctx#var). | String | optional | package type specific | +| package_variables | A target that provides `PackageVariablesInfo` to substitute into `package_file_name`. `pkg_zip` and `pkg_tar` also support this in `package_dir` | Label | optional | None | | attributes | Attributes to set on entities created within packages. Not to be confused with bazel rule attributes. See 'Mapping "Attributes"' below | Undefined. | optional | Varies. Consult individual rule documentation for details. | See @@ -126,10 +126,10 @@ pkg_deb(name, archit | homepage | The homepage of the project. | String | optional | "" | | license | The license of the project. | String | optional | "" | | maintainer | The maintainer of the package. | String | required | | -| out | See Common Attributes | Label | required | | +| out | See [Common Attributes](#out) | Label | required | | | package | The name of the package | String | required | | -| package_file_name | See Common Attributes. Default: "{package}-{version}-{architecture}.deb | String | optional | "" | -| package_variables | See Common Attributes | Label | optional | None | +| package_file_name | See [Common Attributes](#package_file_name). Default: "{package}-{version}-{architecture}.deb | String | optional | "" | +| package_variables | See [Common Attributes](#package_variables) | Label | optional | None | | postinst | The post-install script for the package. See http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html. | Label | optional | None | | postrm | The post-remove script for the package. See http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html. | Label | optional | None | | predepends | See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps. | List of strings | optional | [] | @@ -290,10 +290,10 @@ pkg_tar(name, build_tar | ownername | - | String | optional | "." | | ownernames | - | Dictionary: String -> String | optional | {} | | owners | - | Dictionary: String -> String | optional | {} | -| package_dir | Prefix to be prepend to all paths written. | String | optional | "" | +| package_dir | Prefix to be prepend to all paths written. The name may contain variables, same as [package_file_name](#package_file_name) | String | optional | "" | | package_dir_file | - | Label | optional | None | -| package_file_name | See Common Attributes | String | optional | "" | -| package_variables | See Common Attributes | Label | optional | None | +| package_file_name | See [Common Attributes](#package_file_name) | String | optional | "" | +| package_variables | See [Common Attributes](#package_variables) | Label | optional | None | | portable_mtime | - | Boolean | optional | True | | private_stamp_detect | - | Boolean | optional | False | | remap_paths | - | Dictionary: String -> String | optional | {} | @@ -313,8 +313,8 @@ Zip archive creation rule and associated logic. ## pkg_zip
-pkg_zip(name, mode, out, package_dir, package_file_name, package_variables, - private_stamp_detect, srcs, stamp, strip_prefix, timestamp) +pkg_zip(name, compression_level, compression_type, mode, out, package_dir, package_file_name, + package_variables, private_stamp_detect, srcs, stamp, strip_prefix, timestamp)@@ -325,11 +325,13 @@ pkg_zip(name, mode, name | A unique name for this target. | Name | required | | +| compression_level | The compression level to use, 1 is the fastest, 9 gives the smallest results. 0 skips compression, depending on the method used | Integer | optional | 6 | +| compression_type | The compression to use. Note that lzma and bzip2 might not be supported by all readers. The list of compressions is the same as Python's ZipFile: https://docs.python.org/3/library/zipfile.html#zipfile.ZIP_STORED | String | optional | "deflated" | | mode | The default mode for all files in the archive. | String | optional | "0555" | | out | output file name. Default: name + ".zip". | Label | required | | -| package_dir | The prefix to add to all all paths in the archive. | String | optional | "/" | -| package_file_name | See Common Attributes | String | optional | "" | -| package_variables | See Common Attributes | Label | optional | None | +| package_dir | Prefix to be prepend to all paths written. The name may contain variables, same as [package_file_name](#package_file_name) | String | optional | "/" | +| package_file_name | See [Common Attributes](#package_file_name) | String | optional | "" | +| package_variables | See [Common Attributes](#package_variables) | Label | optional | None | | private_stamp_detect | - | Boolean | optional | False | | srcs | List of files that should be included in the archive. | List of labels | optional | [] | | stamp | Enable file time stamping. Possible values: