ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

How to generate .deb of ROS package step by step outside ros buildfarm

asked 2016-08-13 04:18:32 -0600

rikardo gravatar image

Hi there, Can anyone provide a tutorial to generate a .deb of a ROS package step by step so that the others can use it to install the package without source code.

Many thanks, Rickardo

edit retag flag offensive close merge delete

Comments

Hey Rikardo, did you solve this?

tanasis gravatar image tanasis  ( 2018-01-03 08:15:32 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-08-14 00:57:16 -0600

tfoote gravatar image

If you want to build a ROS package into a deb, you can do it just like any debian package manually I highly recommend reading through the Debian documentation. There's a relatively steep learning curve unfortunately.

A few starting points are:

I don't know what your use case is, but if you're building ROS packages privately you can still use bloom to generate a lot of the boilerplate needed above. And you can use git-buildpackage to build the resultant debian packages locally in approximately one line.

A simpler approach that can fill many use cases is to use the checkinstall tool. You can use checkinstall with the install target for a catkin workspace.

edit flag offensive delete link more
2

answered 2016-08-15 11:30:52 -0600

Michael Johnson gravatar image

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/mod...

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).

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2016-08-13 04:18:32 -0600

Seen: 1,574 times

Last updated: Aug 15 '16