From b91e8e429a85291058ecab6ea42fd4d2e8c25ddf Mon Sep 17 00:00:00 2001 From: "h.udo" Date: Fri, 15 Jul 2016 13:47:31 +0100 Subject: [PATCH] [cmake] Add Debian packaging documentation --- project/cmake/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/project/cmake/README.md b/project/cmake/README.md index fafd07885a4f5..3a256f0f506dc 100644 --- a/project/cmake/README.md +++ b/project/cmake/README.md @@ -89,6 +89,21 @@ cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) `CMAKE_BUILD_TYPE` defaults to `Release`. +#### Debian package generation +The buildsystem is capable of generating Debian packages using CPack. To generate them, `CPACK_GENERATOR` has to be set to *DEB*, i.e. executing CMake's configure step with `-DCPACK_GENERATOR=DEB`. +You should use CMake/CPack 3.6.0 or higher. Lower versions can generate the packages but package names will be mangled. + +The following optional variables (which can be passed to buildsystem when executing cmake with the -D`=` format) can be used to manipulate package type, name and version: + +- `DEBIAN_PACKAGE_TYPE` controls the name and version of generated packages. Accepted values are `stable`, `unstable` and `nightly` (default is `nightly`). +- `DEBIAN_PACKAGE_EPOCH` controls package epoch (default is `2`) +- `DEBIAN_PACKAGE_VERSION` controls package version (default is `0`) +- `DEBIAN_PACKAGE_REVISION` controls package revision (no default is set) + +A lot more variables are available (see cpack/CPackDebian.cmake file) but you shouldn't mess with them unless you know what you're doing. + +Packages metadata can be changed simply by editing files present in the `cpack/deb` folder. + ### Raspberry Pi with GNU Makefiles ```