diff options
author | Raffi Enficiaud <raffi.enficiaud@mines-paris.org> | 2015-09-11 18:58:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-17 19:30:39 (GMT) |
commit | 7044e8ee4baa8250fd9c4e915b13d53c7f543ea3 (patch) | |
tree | 7bb17ea60ebf7950e4fc342ae33f425c2210f6ee /Tests/CPackComponentsDEB | |
parent | 415405a308239f2904c9e2d30e4a3d699ccf01a0 (diff) | |
download | CMake-7044e8ee4baa8250fd9c4e915b13d53c7f543ea3.zip CMake-7044e8ee4baa8250fd9c4e915b13d53c7f543ea3.tar.gz CMake-7044e8ee4baa8250fd9c4e915b13d53c7f543ea3.tar.bz2 |
CPackDeb: use of libarchive and removal of fakeroot
Diffstat (limited to 'Tests/CPackComponentsDEB')
-rw-r--r-- | Tests/CPackComponentsDEB/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CPackComponentsDEB/CMakeLists.txt b/Tests/CPackComponentsDEB/CMakeLists.txt index 5c4eeab..5a5d626 100644 --- a/Tests/CPackComponentsDEB/CMakeLists.txt +++ b/Tests/CPackComponentsDEB/CMakeLists.txt @@ -80,6 +80,25 @@ set(CPACK_COMPONENT_HEADERS_DESCRIPTION # depend on the libraries component. set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) +# creates preinst/prerm scripts with specific permissions. Those permissions +# (especially executable) should be in the final archive +find_program(CHMOD_PROG chmod) +if(CHMOD_PROG) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/preinst "echo default_preinst") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/prerm "echo default_prerm") + + # Those should have 755 permission normally. We mess it up to see if + # CPACK_DEBIAN_APPLICATIONS_PACKAGE_CONTROL_STRICT_PERMISSION is able to fix + # it. + execute_process(COMMAND ${CHMOD_PROG} 640 ${CMAKE_CURRENT_BINARY_DIR}/preinst) + execute_process(COMMAND ${CHMOD_PROG} 640 ${CMAKE_CURRENT_BINARY_DIR}/prerm) + + set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_CONTROL_EXTRA + "${CMAKE_CURRENT_BINARY_DIR}/preinst;${CMAKE_CURRENT_BINARY_DIR}/prerm") + + set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_CONTROL_STRICT_PERMISSION TRUE) +endif() + # We may use the CPack specific config file in order # to tailor CPack behavior on a CPack generator specific way # (Behavior would be different for RPM or TGZ or DEB ...) |