diff --git a/_multibuild b/_multibuild index 111d071b3336325e54482a0be38dacf3fa06505e..17c7467e456a48f76500fbdb3c835526fb1e2762 100644 --- a/_multibuild +++ b/_multibuild @@ -5,4 +5,5 @@ swri-prefix-tools swri-serial-util swri-system-util + swri-cli-tools diff --git a/ros-humble-swri-cli-tools_3.7.3.orig.tar.gz b/ros-humble-swri-cli-tools_3.7.3.orig.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a2450674547f4e4728f91231b9e8d7d8fd812d4e Binary files /dev/null and b/ros-humble-swri-cli-tools_3.7.3.orig.tar.gz differ diff --git a/swri-cli-tools.spec b/swri-cli-tools.spec new file mode 100644 index 0000000000000000000000000000000000000000..8381d3c3aea7d9620a78f7ee3a982bdbc689f2c2 --- /dev/null +++ b/swri-cli-tools.spec @@ -0,0 +1,89 @@ +%bcond_without tests +%bcond_without weak_deps + +%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}/.*$ + +%define RosPkgName swri-cli-tools +%define ros_distro humble +%define with_tests 0 + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 3.7.3 +Release: 1%{?dist}%{?release_suffix} +Summary: Command line tools for introspecting ROS systems + +License: BSD 3 Clause +Source0: %{name}_%{version}.orig.tar.gz + +Requires: ros-%{ros_distro}-marti-introspection-msgs +Requires: python3-natsort +Requires: ros-%{ros_distro}-rcl-interfaces +Requires: ros-%{ros_distro}-rclpy +Requires: ros-%{ros_distro}-ros2cli +Requires: ros-%{ros_distro}-ros2node +Requires: ros-%{ros_distro}-ros2param +Requires: ros-%{ros_distro}-ros2topic + +BuildRequires: ros-%{ros_distro}-marti-introspection-msgs +BuildRequires: python3-natsort +BuildRequires: ros-%{ros_distro}-rcl-interfaces +BuildRequires: ros-%{ros_distro}-rclpy +BuildRequires: ros-%{ros_distro}-ros2cli +BuildRequires: ros-%{ros_distro}-ros2node +BuildRequires: ros-%{ros_distro}-ros2param +BuildRequires: ros-%{ros_distro}-ros2topic + +%if 0%{?with_tests} +BuildRequires: ros-%{ros_distro}-ament-copyright +BuildRequires: ros-%{ros_distro}-ament-flake8 +BuildRequires: ros-%{ros_distro}-ament-pep257 +BuildRequires: ros-%{ros_distro}-ament-xmllint +%endif + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +Command line tools for introspecting ROS systems + +%prep +%autosetup -p1 + +%build + +# 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 +%py3_build + +%install +# 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 +%py3_install -- --prefix "/opt/ros/%{ros_distro}" + +%if 0%{?with_tests} +%check +# Look for a directory with a name indicating that it contains tests +TEST_TARGET=$(ls -d * | grep -m1 "\(test\|tests\)" ||:) +if [ -n "$TEST_TARGET" ] && %__python3 -m pytest --version; 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 +%__python3 -m pytest $TEST_TARGET || echo "RPM TESTS FAILED" +else echo "RPM TESTS SKIPPED"; fi +%endif + +%files +/opt/ros/%{ros_distro} + +%changelog +* Fri May 23 2025 Southwest Research Institute swri-robotics@swri.org - 3.7.3-1 +- Autogenerated by ros-porting-tools