diff options
Diffstat (limited to 'irobot-create-description.spec')
| -rw-r--r-- | irobot-create-description.spec | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/irobot-create-description.spec b/irobot-create-description.spec new file mode 100644 index 0000000..a477e4e --- /dev/null +++ b/irobot-create-description.spec @@ -0,0 +1,66 @@ +%define ros_distro humble +%define RosPkgName irobot-create-description + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 2.1.0 +Release: 1%{?dist} +Summary: Provides the model description for the iRobot(R) Create(R) 3 Educational Robot. +License: BSD +URL: https://github.com/iRobotEducation/create3_sim +Source0: https://github.com/iRobotEducation/create3_sim/archive/refs/tags/%{version}.tar.gz + +%global debug_package %{nil} +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +BuildRequires: ros-%{ros_distro}-ament-cmake + +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +Requires: ros-%{ros_distro}-urdf + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +Provides the model description for the iRobot(R) Create(R) 3 Educational Robot. + +%prep +%autosetup -n create3_sim-%{version} + +%build +[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} +export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} + +mkdir -p irobot_create_common/irobot_create_description/.obj +cd irobot_create_common/irobot_create_description/.obj +%cmake3 \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ + -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -UINCLUDE_INSTALL_DIR -ULIB_INSTALL_DIR -USYSCONF_INSTALL_DIR \ + -USHARE_INSTALL_PREFIX -ULIB_SUFFIX \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DBUILD_TESTING=OFF \ + -DTESTING=OFF \ + -DCMAKE_SUPPRESS_REGENERATION=ON \ + .. +make %{?_smp_mflags} + +%install +[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} +export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} + +cd irobot_create_common/irobot_create_description/.obj +make install DESTDIR=%{buildroot} + +%files +/opt/ros/%{ros_distro}/ + +%changelog +* Sun Sep 20 2026 ai-importer <ai-importer@openeuler.org> - 2.1.0-1 +- 自动生成:引入 ros-humble-irobot-create-description 2.1.0 |
