diff options
Diffstat (limited to 'easynav-mhamcl-localizer.spec')
| -rw-r--r-- | easynav-mhamcl-localizer.spec | 54 |
1 files changed, 14 insertions, 40 deletions
diff --git a/easynav-mhamcl-localizer.spec b/easynav-mhamcl-localizer.spec index 3881dae..cad08d3 100644 --- a/easynav-mhamcl-localizer.spec +++ b/easynav-mhamcl-localizer.spec @@ -5,26 +5,23 @@ Name: ros-%{ros_distro}-%{RosPkgName} Version: 0.5.0 Release: 1%{?dist} -Summary: Easy Navigation: Multi-Hypothesis AMCL Localizer package. +Summary: Easy Navigation: Multi-Hypothesis AMCL Localizer package License: Apache-2.0 URL: https://github.com/EasyNavigation/easynav_plugins/tree/humble Source0: %{RosPkgName}-%{src_version}.tar.gz -# ROS 包统一关闭 debug 子包(/opt 前缀,strip/debugedit 路径非常规) %global debug_package %{nil} -# 摘掉 brp-python-bytecompile(/opt 下 python 字节码编译会写标准 sitelib 路径) %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') -# /opt/ros 下 .so 不做自动依赖扫描(由 ament 间接依赖模型替代) %global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ %global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ -# ── BuildRequires ── -# 构建工具 BuildRequires: cmake -BuildRequires: make -# ROS 构建工具(buildtool_depend) BuildRequires: ros-%{ros_distro}-ament-cmake -# ROS 依赖(package.xml <depend>,经 ros-projects.list 验证 SIG 源已有) +BuildRequires: ros-%{ros_distro}-easynav-common +BuildRequires: ros-%{ros_distro}-easynav-costmap-common +BuildRequires: ros-%{ros_distro}-easynav-core +BuildRequires: ros-%{ros_distro}-easynav-localizer +BuildRequires: ros-%{ros_distro}-easynav-sensors BuildRequires: ros-%{ros_distro}-geometry-msgs BuildRequires: ros-%{ros_distro}-nav-msgs BuildRequires: ros-%{ros_distro}-pluginlib @@ -33,26 +30,15 @@ BuildRequires: ros-%{ros_distro}-tf2 BuildRequires: ros-%{ros_distro}-tf2-geometry-msgs BuildRequires: ros-%{ros_distro}-tf2-ros BuildRequires: ros-%{ros_distro}-visualization-msgs -# 批次兄弟包(dep_registry 中注册,同一 COPR project 构建,安装时同源解析) -BuildRequires: ros-%{ros_distro}-easynav-common -BuildRequires: ros-%{ros_distro}-easynav-core -BuildRequires: ros-%{ros_distro}-easynav-costmap-common -BuildRequires: ros-%{ros_distro}-easynav-localizer -BuildRequires: ros-%{ros_distro}-easynav-sensors -# 系统依赖(package.xml <depend>,经 pkg.remap 映射 eigen → eigen3-devel) BuildRequires: eigen3-devel -# ── Requires(运行时,/opt/ros 被 __requires_exclude_from 豁免,autodeps 扫不到,必须手写)── -# 强制三件套:ros-workspace 提供 setup.sh 环境就绪,ament-cmake 提供 ament 运行期钩子 Requires: ros-%{ros_distro}-ros-workspace Requires: ros-%{ros_distro}-ament-cmake -# package.xml <depend> 的运行时映射 Requires: ros-%{ros_distro}-easynav-common -Requires: ros-%{ros_distro}-easynav-core Requires: ros-%{ros_distro}-easynav-costmap-common +Requires: ros-%{ros_distro}-easynav-core Requires: ros-%{ros_distro}-easynav-localizer Requires: ros-%{ros_distro}-easynav-sensors -Requires: eigen3-devel Requires: ros-%{ros_distro}-geometry-msgs Requires: ros-%{ros_distro}-nav-msgs Requires: ros-%{ros_distro}-pluginlib @@ -61,32 +47,23 @@ Requires: ros-%{ros_distro}-tf2 Requires: ros-%{ros_distro}-tf2-geometry-msgs Requires: ros-%{ros_distro}-tf2-ros Requires: ros-%{ros_distro}-visualization-msgs +Requires: eigen3-devel -# 单包策略:严禁拆实体子包(主包 %files 整树拥有时路径必然重叠) Provides: %{name}-devel = %{version}-%{release} Provides: %{name}-doc = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} %description -Easy Navigation: Multi-Hypothesis AMCL Localizer package. Multi-Hypothesis AMCL -localizer that keeps several pose hypotheses over a Costmap2D map, so it can -localize without an initial pose and recover from kidnapping. +Easy Navigation: Multi-Hypothesis AMCL Localizer package. %prep %autosetup -n %{RosPkgName}-%{src_version} %build -# 源码在 monorepo 子目录中 -cd localizers/easynav_mhamcl_localizer - -# ROS 基座环境(chroot 已配置 ROS SIG repo;无 ROS 依赖的包 buildroot 里 -# 可能没有 setup.sh,必须用 [ -f ] 守卫——直接 source 不存在的文件在 -# 严格 sh 下会中止整个 %build 脚本,|| true 挡不住) [ -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} - -# 显式 out-of-source 构建(避免 openEuler %cmake 宏位置参数坑,spec-rules §5) +cd localizers/easynav_mhamcl_localizer mkdir -p .obj && cd .obj cmake \ -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ @@ -99,19 +76,16 @@ cmake \ make %{?_smp_mflags} %install -cd localizers/easynav_mhamcl_localizer/.obj - -# ROS 基座环境 [ -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 localizers/easynav_mhamcl_localizer +cd .obj make install DESTDIR=%{buildroot} %files -# 整树拥有:对「装了没打包」类错误免疫(spec-rules §7) /opt/ros/%{ros_distro} %changelog -* Sat Oct 10 2026 AI Importer <ai-importer@opencode.local> - 0.5.0-1 -- 初始 ROS humble spec,引入 easynav-mhamcl-localizer +* Tue Oct 20 2026 ai-importer <ai-importer@openeuler.org> - 0.5.0-1 +- Initial import (ROS batch) |
