The easiest way I have found to do this is by using CPack which is a CMake module.
https://cmake.org/cmake/help/v3.0/module/CPack.html
In one of your CMakeLists.txt files you can add the following to generate a .deb
set(CPACK_PACKAGE_NAME ${PACKAGE_NAME})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_NAME} debian package")
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_CONTACT "${${PROJECT_NAME}_MAINTAINER}")
set(CPACK_PACKAGE_VENDOR "${${PROJECT_NAME}_MAINTAINER}")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
include(CPack)
Note that this will create a debian from your entire catkin workspace as all of the CMakeLists.txt files are merged into one when using catkin (although it might be possible to get round this using catkin_make_isolated).
Originally posted by Michael Johnson with karma: 154 on 2016-08-15
This answer was NOT ACCEPTED on the original site
Post score: 2