From 62db571f64e5db555b67be5212babd8133904b69 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 9 Oct 2026 03:21:23 +0000 Subject: automatic import of ros-humble-ess-imu-driver2 --- .gitignore | 1 + ess_imu_driver2.spec | 111 +++++++++++++++++++++++++++++++++++++++ fix-install-library-target.patch | 14 +++++ sources | 1 + 4 files changed, 127 insertions(+) create mode 100644 ess_imu_driver2.spec create mode 100644 fix-install-library-target.patch create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..d49317e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ros-humble-ess-imu-driver2_2.0.1.orig.tar.gz diff --git a/ess_imu_driver2.spec b/ess_imu_driver2.spec new file mode 100644 index 0000000..71b7dd5 --- /dev/null +++ b/ess_imu_driver2.spec @@ -0,0 +1,111 @@ +%bcond_without tests +%bcond_without weak_deps + +%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}/.*$ + +%define RosPkgName ess-imu-driver2 +%define ros_distro humble +%define with_tests 0 + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 2.0.1 +Release: 2%{?dist}%{?release_suffix} +Summary: ROS2 package for Epson IMU using C++ wrapper around Linux C driver + +Url: https://wiki.ros.org/ess_imu_driver2 +License: BSD-3 and Public Domain +Source0: %{name}_%{version}.orig.tar.gz +Patch0: fix-install-library-target.patch + +Requires: ros-%{ros_distro}-rclcpp +Requires: ros-%{ros_distro}-sensor-msgs + +BuildRequires: ros-%{ros_distro}-rclcpp +BuildRequires: ros-%{ros_distro}-sensor-msgs +BuildRequires: ros-%{ros_distro}-ament-cmake + +%if 0%{?with_tests} +BuildRequires: ros-%{ros_distro}-ament-lint-auto +BuildRequires: ros-%{ros_distro}-ament-common +%endif + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +ROS2 package for Epson IMU using C++ wrapper around Linux C driver + +%prep +%autosetup -p1 + +%build +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +export ROS_DISTRO=%{ros_distro} +export ROS_PYTHON_VERSION=%{python3_version} + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} +%cmake3 \ + -UINCLUDE_INSTALL_DIR \ + -ULIB_INSTALL_DIR \ + -USYSCONF_INSTALL_DIR \ + -USHARE_INSTALL_PREFIX \ + -ULIB_SUFFIX \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ + -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_INSTALL_LIBDIR="/opt/ros/%{ros_distro}/lib" \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ +%if !0%{?with_tests} + -DBUILD_TESTING=OFF \ +%endif + .. + +%make_build + +%install +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +%make_install -C .obj-%{_target_platform} + +%if 0%{?with_tests} +%check +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# Look for a Makefile target with a name indicating that it runs tests +TEST_TARGET=$(%__make -qp -C .obj-%{_target_platform} | sed "s/^\(test\|check\):.*/\\1/;t f;d;:f;q0") +if [ -n "$TEST_TARGET" ]; then +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +CTEST_OUTPUT_ON_FAILURE=1 \ + %make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED" +else echo "RPM TESTS SKIPPED"; fi +%endif + +%files +/opt/ros/%{ros_distro} + +%changelog +* Fri Oct 09 2026 kuyan_kubuds - 2.0.1-2 +- Fix missing installation of libess_imu_driver2_lib.so: upstream install() only + listed the node target, so the shared library the node links against was never + packaged (node failed to start with a missing shared object). + +* Fri May 23 2025 Raymond Chow raymond.chow@ea.epson.com - 2.0.1-1 +- Autogenerated by ros-porting-tools diff --git a/fix-install-library-target.patch b/fix-install-library-target.patch new file mode 100644 index 0000000..71299dc --- /dev/null +++ b/fix-install-library-target.patch @@ -0,0 +1,14 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2024-10-02 12:58:35.000000000 +0800 ++++ b/CMakeLists.txt 2026-10-09 11:18:52.180636822 +0800 +@@ -132,6 +132,10 @@ + TARGETS ess_imu_driver2_node + DESTINATION lib/${PROJECT_NAME} + ) ++install( ++ TARGETS ess_imu_driver2_lib ++ DESTINATION lib ++ ) + + # Mark directories for installation + install( diff --git a/sources b/sources new file mode 100644 index 0000000..7f5b7c2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +77327705cb4bf5945c9b8be25e571d3e ros-humble-ess-imu-driver2_2.0.1.orig.tar.gz -- cgit v1.2.3