The following shows how to create an rpm package.
(*)By default, document build is not generated because it is OFF.
$ cd Project directory $ mkdir build $ cd build $ cmake .. $ make $ cpack
$ cd Project directory $ mkdir build $ cd build $ cmake .. $ cpack
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)
$ cd Project directory $ mkdir build $ cd build $ cmake .. $ make $ make doc $ cpack
$ 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".
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].
$ 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".
$ 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
Installation executes the following command.
$ cd <Project directory>/build $ sudo rpm -i Flip-1.2.0-x86_64.rpm
To uninstall, execute the following command.
$ sudo rpm -e Flip
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