Skip to content

Instantly share code, notes, and snippets.

@awesomebytes
Last active February 18, 2025 13:59

Revisions

  1. Sam Pfeiffer revised this gist Dec 15, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -83,7 +83,7 @@ dh: Command not found
    ```
    You need to install:
    ```bash
    sudo apt-get install dpkg-dev
    sudo apt-get install dpkg-dev debhelper
    ```

    In the end you'll get a line like:
  2. Sam Pfeiffer revised this gist Dec 15, 2016. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -77,6 +77,15 @@ Having sourced the necessary dependencies (most probably `source /opt/ros/indigo
    fakeroot debian/rules binary
    ```

    If you get the error:
    ```bash
    dh: Command not found
    ```
    You need to install:
    ```bash
    sudo apt-get install dpkg-dev
    ```

    In the end you'll get a line like:

    ```
  3. Sam Pfeiffer revised this gist Dec 15, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,11 @@ the package to be in the same folder where `package.xml` file is.
    bloom-generate rosdebian --os-name ubuntu --os-version trusty --ros-distro indigo
    ```

    You can also let the tool guess some stuff:
    ```bash
    bloom-generate rosdebian --ros-distro indigo
    ```

    You'll get something like this:

    ```bash
  4. Sam Pfeiffer revised this gist Dec 15, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -3,14 +3,15 @@
    The instructions are based on [this answers.ros.org thread](http://answers.ros.org/question/173804/generate-deb-from-ros-package/).

    ## Get dependencies
    You may need the latest pip, follow the [official instructions](https://pip.pypa.io/en/stable/installing/).

    Install [bloom](http://ros-infrastructure.github.io/bloom/):

    ```bash
    sudo apt-get install python-bloom
    ```

    or
    or (recommended)

    ```bash
    sudo pip install -U bloom
  5. Sam Pfeiffer revised this gist Nov 23, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # How to make a debian from a ROS package and offer it thru launchpad
    # How to make a debian from a ROS package

    The instructions are based on [this answers.ros.org thread](http://answers.ros.org/question/173804/generate-deb-from-ros-package/).

  6. Sam Pfeiffer revised this gist Nov 22, 2016. 1 changed file with 16 additions and 2 deletions.
    18 changes: 16 additions & 2 deletions debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -16,10 +16,10 @@ or
    sudo pip install -U bloom
    ```

    Install [checkinstall](https://help.ubuntu.com/community/CheckInstall):
    Install fakeroot:

    ```bash
    sudo apt-get install checkinstall
    sudo apt-get install fakeroot
    ```

    ## Get ready
    @@ -63,3 +63,17 @@ action assets CMakeLists.txt debian launch package.xml README.md scripts
    changelog compat control rules source
    ```

    ## Create binary debian

    Having sourced the necessary dependencies (most probably `source /opt/ros/indigo/setup.bash`) execute:

    ```bash
    fakeroot debian/rules binary
    ```

    In the end you'll get a line like:

    ```
    dpkg-deb: building package `ros-indigo-audio-file-player' in `../ros-indigo-audio-file-player_0.0.1-0trusty_amd64.deb'.
    ```

  7. Sam Pfeiffer created this gist Nov 22, 2016.
    65 changes: 65 additions & 0 deletions debian_from_ros_pkg.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    # How to make a debian from a ROS package and offer it thru launchpad

    The instructions are based on [this answers.ros.org thread](http://answers.ros.org/question/173804/generate-deb-from-ros-package/).

    ## Get dependencies

    Install [bloom](http://ros-infrastructure.github.io/bloom/):

    ```bash
    sudo apt-get install python-bloom
    ```

    or

    ```bash
    sudo pip install -U bloom
    ```

    Install [checkinstall](https://help.ubuntu.com/community/CheckInstall):

    ```bash
    sudo apt-get install checkinstall
    ```

    ## Get ready

    To make a debian folder structure from the ROS package you must cd into
    the package to be in the same folder where `package.xml` file is.

    ## Create debian structure

    ```bash
    bloom-generate rosdebian --os-name ubuntu --os-version trusty --ros-distro indigo
    ```

    You'll get something like this:

    ```bash
    ~/audio_ws/src/audio_file_player$ bloom-generate rosdebian --os-name ubuntu --os-version trusty --ros-distro indigo
    ==> Generating debs for ubuntu:trusty for package(s) ['audio_file_player']
    No homepage set, defaulting to ''
    No historical releaser history, using current maintainer name and email for each versioned changelog entry.
    No CHANGELOG.rst found for package 'audio_file_player'
    Package 'audio-file-player' has dependencies:
    Run Dependencies:
    rosdep key => trusty key
    rospy => ['ros-indigo-rospy']
    actionlib_msgs => ['ros-indigo-actionlib-msgs']
    Build and Build Tool Dependencies:
    rosdep key => trusty key
    rospy => ['ros-indigo-rospy']
    actionlib_msgs => ['ros-indigo-actionlib-msgs']
    catkin => ['ros-indigo-catkin']
    ==> Placing templates files in the 'debian' folder.
    ==> In place processing templates in 'debian' folder.
    Expanding 'debian/control.em' -> 'debian/control'
    Expanding 'debian/changelog.em' -> 'debian/changelog'
    Expanding 'debian/compat.em' -> 'debian/compat'
    Expanding 'debian/rules.em' -> 'debian/rules'
    ~/audio_ws/src/audio_file_player$ ls
    action assets CMakeLists.txt debian launch package.xml README.md scripts
    ~/audio_ws/src/audio_file_player$ ls debian
    changelog compat control rules source
    ```