Create rpm with CPack (Linux)

(G)Introduction

The following shows how to create an rpm 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 OFF in this line 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 cannot find
 "/home/<Project directory>/build/doc/html/doxygen/html".

(G)rpm package storage location, filename

If it succeeds, it is saved in [build] in the project directory.
The file name is "RTC project name-RTC version number-architecture".

(Example) Flip-1.2.0-x86_64.rpm
(*) The architecture is [i686] or [x86_64].

(G)How to check rpm package

  • When confirming rpm package with less command

 $ cd <Project directory>/build 
 $ less Flip-1.2.0-x86_64.rpm
 Name        : Flip
 Version     : 1.2.0
 Release     : 1
 Architecture: x86_64
 Install Date: (not installed)
 Group       : unknown
 Size        : 506080
 License     : unknown
 Signature   : (none)
 Source RPM  : Flip-1.2.0-1.src.rpm
 Build Date  : 2017 xxmonth xxdays xxhours xxminutes xxseconds
 Build Host  : localhost
 Relocations : /usr 
 Vendor      : AIST
 Summary     : Flip image component
 Description :
 DESCRIPTION

To exit less, press "q".

  • When extracting and checking the contents of rpm 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-x86_64.rpm .
 $ 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)Installation/Uninstallation of rpm package

(G)Installation

Installation executes the following command.

 $ cd <Project directory>/build 
 $ sudo rpm -i Flip-1.2.0-x86_64.rpm

(G)Uninstall

To uninstall, execute the following command.

 $ sudo rpm -e 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.

Below is a list of files installed from rpm 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

For Begginers

Windows msi(installer) package (only trying samples)

C++,Python,Java,
Toolsを含む
1.2.1-RELEASE

Development environment is required for RT-Component development. See download page for details.

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