Create deb with CPack (Linux)

(G)Introduction

The following shows how to create a deb package.

(G)Steps for creating without including doxygen document

By default, document build is not generated because it is OFF.

  • For C++ RTC

 $ cd project directory
 $ mkdir build
 $ cd build
 $ cmake ..
 $ make
 $ cpack

  • For Python RTC

 $ cd project directory
 $ mkdir build
 $ cd build
 $ cmake ..
 $ cpack

(G)Steps for creating doxygen documents

Change the following line of CMakeLists.txt immediately under the project directory from OFF to ON.
In case of C ++ RTC, it is around 86th row, and in Python RTC it is around 77th line.

 option(BUILD_DOCUMENTATION "Build the documentation" ON) (*) Rewrite this line OFF to ON. (Default is OFF)

  • For C++ RTC

 $ cd project directory
 $ mkdir build
 $ cd build
 $ cmake ..
 $ make
 $ make doc
 $ cpack

  • For Python RTC

 $ cd project directory
 $ mkdir build
 $ cd build
 $ cmake ..
 $ make doc
 $ cpack

【Notes】
If you turn on document build and execute "cpack" without "make doc", the following error occurs.

 CMake Error at /home/project directory/build/doc/cmake_install.cmake: 36 (file):
 file INSTALL can not find  "/home/project directory/build/doc/html/doxygen/html".

(G)deb Save package location, file name

If it succeeds, it is saved in [build] of the project directory.
The file name is "RTC project name_RTC version number_architecture".

(Example) Flip_1.2.0_amd64.deb
(*)The architecture is [i386] or [amd64].

(G)How to check deb package

  • When confirming the deb package with the less command

 $ cd project directory/build
 $ less Flip_1.2.0_amd64.deb
 Flip_1.2.0_amd64.deb
 New format debian package, version 2.0.
 Size 258304 bytes: Control archive = 2797 bytes.
     162 bytes,    9 rows      control              
   10062 bytes,   92 rows      md5sums              
 Package: affine
 Version: 1.2.0
 Section: devel
 Priority: optional
 Architecture: amd64
 Installed-Size: 884
 Maintainer: unknown (*)If package maintainer information is not defined, it will be "unknown"
 Description: Flip image component

To exit less, press "q".

  • When extracting and checking contents of deb package
    If the tree command is not installed, install it.

 $ sudo apt-get install tree

 $ cd project directory/build
 $ dpkg -x Flip_1.2.0_amd64.deb .
 $ tree usr
 usr
 └─ share
     └─ openrtm-1.2
          └─ components
               └─ python
                    └─ Category (*)Specified installation directory
                         └─ FlipGUI
                              ├─ RTC.xml
                              ├─ FlipGUIComp.py
                              ├─ idl
                              │    ├─ BasicDataType.idl
                              │    ├─ CMakeLists.txt
                              │    ├─ CalibrationService.idl
                              │    ├─ ExtendedDataTypes.idl
                              │    └─ InterfaceDataTypes.idl
                              ├─ idlcompile.sh
                              ├─ rtutil.py
                              ├─ setup.py
                              └─ flipgui.py

(G)Install/Uninstall deb package

(G)Installation

Installation executes the following command.

 $ cd project directory/build
 $ sudo dpkg -i Flip_1.2.0_amd64.deb

(G)Uninstall

To uninstall, execute the following command.

 $ sudo dpkg -r Flip

(G)IDL compilation process of Python RTC with service port

Python RTC with service port performs IDL compilation at package installation. Before IDL compilation is executed, postinst.in and prerm.in in the project directory realize this behavior, so be careful as deleting these files will not work. & br; & br; Below is a list of files installed from the deb package. ★ A file is generated by IDL compilation.

 $ tree /usr/share/openrtm-1.2/components/python/Category/FlipGUI/
 /usr/share/openrtm-1.2/components/python/Category/FlipGUI/
   ├─ BasicDataType_idl.py  ★
   ├─ CalibrationService_idl.py  ★
   ├─ ExtendedDataTypes_idl.py  ★
   ├─ ImageCalibService  ★
   │   └─ __init__.py  ★
   ├─ ImageCalibService__POA  ★
   │   └─ __init__.py  ★
   ├─ InterfaceDataTypes_idl.py  ★
   ├─ RTC  ★
   │   └─ __init__.py  ★
   ├─ RTC.xml
   ├─ RTC__POA  ★
   │   └─ __init__.py  ★
   ├─ FlipGUIComp.py
   ├─ idl
   │   ├─ BasicDataType.idl
   │   ├─ CMakeLists.txt
   │   ├─ CalibrationService.idl
   │   ├─ ExtendedDataTypes.idl
   │   └─ InterfaceDataTypes.idl
   ├─ idlcompile.sh
   ├─ rtutil.py
   ├─ setup.py
   └─ flipgui.py

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK