From f3f762e37ffcc8793f98dccafb2d30c755b90bec Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 10 Oct 2026 13:35:38 +0000 Subject: automatic import of navmap-ros-interfaces --- navmap-ros-interfaces.spec | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 navmap-ros-interfaces.spec (limited to 'navmap-ros-interfaces.spec') diff --git a/navmap-ros-interfaces.spec b/navmap-ros-interfaces.spec new file mode 100644 index 0000000..5c78ef2 --- /dev/null +++ b/navmap-ros-interfaces.spec @@ -0,0 +1,94 @@ +# ROS 2 interface package (ament_cmake) from NavMap monorepo +# topdir: navmap-ros-interfaces-0.6.0 (via --transform) +# target subpackage: navmap_ros_interfaces/ + +%define ros_distro humble + +Name: navmap-ros-interfaces +Version: 0.6.0 +Release: 1%{?dist} +Summary: ROS 2 interfaces for NavMap (messages for visualization and layers) + +License: Apache-2.0 +URL: https://github.com/EasyNavigation/NavMap +Source0: https://github.com/EasyNavigation/NavMap/archive/refs/heads/humble.tar.gz#/navmap-ros-interfaces-0.6.0.tar.gz + +Group: Development/Libraries +Packager: openEuler Builder + +# debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规) +%global debug_package %{nil} +# /opt 下 python 字节码编译会写标准 sitelib 路径,摘掉 brp-python-bytecompile +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +# ROS 包不做自动依赖扫描(.so 全在 /opt/ros 下,由 ament 间接依赖模型替代) +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: ros-%{ros_distro}-ament-cmake +BuildRequires: ros-%{ros_distro}-builtin-interfaces +BuildRequires: ros-%{ros_distro}-rosidl-default-generators +BuildRequires: ros-%{ros_distro}-std-msgs + +# Runtime Requires (ROS 特有:/opt/ros 被 __requires_exclude_from 豁免,autodeps 扫不到) +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +Requires: ros-%{ros_distro}-rosidl-default-runtime +Requires: ros-%{ros_distro}-builtin-interfaces +Requires: ros-%{ros_distro}-std-msgs + +# Single package strategy: no real subpackages, virtual provides for compat +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +ROS 2 interfaces for NavMap (messages for visualization and layers). +This package provides NavMap, NavMapLayer, and NavMapSurface message +definitions for the NavMap navigation framework. + +%prep +%autosetup -n %{name}-%{version} + +%build +# ROS base environment (chroot may not have setup.sh, guard with [ -f ]) +[ -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} + +# Monorepo: cd into target subdirectory before cmake (avoids scanning +# sibling submodules' CMakeLists.txt) +cd navmap_ros_interfaces +mkdir -p .obj +cd .obj +cmake .. \ + -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 +make %{?_smp_mflags} + +%install +# ROS base environment +[ -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} + +# Monorepo: cd into subpackage build directory +cd navmap_ros_interfaces/.obj +%make_install + +%files +%license LICENSE +/opt/ros/%{ros_distro} + +%changelog +* Sat Oct 10 2026 openEuler Builder - 0.6.0-1 +- Initial package -- cgit v1.2.3