diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-09-23 08:49:43 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-09-23 08:49:43 +0000 |
| commit | ef52b2fe755875fb76bc039b53c4293717620cd4 (patch) | |
| tree | a41651ce699a46787817f5764fd35becd0967eef /nebula-core-hw-interfaces.spec | |
| parent | 177994822b9dc4999368e0cf551f842d6f83cf0d (diff) | |
automatic import of ros-humble-nebula-core-hw-interfaces
Diffstat (limited to 'nebula-core-hw-interfaces.spec')
| -rw-r--r-- | nebula-core-hw-interfaces.spec | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/nebula-core-hw-interfaces.spec b/nebula-core-hw-interfaces.spec new file mode 100644 index 0000000..dbc6402 --- /dev/null +++ b/nebula-core-hw-interfaces.spec @@ -0,0 +1,95 @@ +# ROS spec:nebula-core-hw-interfaces +# 上游:tier4/nebula monorepo(https://github.com/tier4/nebula,branch main) +# 本包为 monorepo 子包,源码位于 src/nebula_core/nebula_core_hw_interfaces/ +# 构建形态:ament_cmake(buildtool 依赖 autoware_cmake) +# Version 取自 ros_pkg_manifest.json 的 target_version=1.2.0 +# Source0 用 ros_fetch 实际拉取的 commit 归档;SRPM 内捆绑归档实测根目录名 = 纯 commit SHA(spec-rules §2) + +%define ros_distro humble +%define RosPkgName nebula-core-hw-interfaces +%global commit 26749c80dff89f39000a9817141143c05ec151ab + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 1.2.0 +Release: 1%{?dist} +Summary: Nebula HW Interfaces Base +License: Apache-2.0 +URL: https://github.com/tier4/nebula +# 实测 SRPM 内捆绑归档解压根目录为纯 commit SHA(spec-rules §2 + SRPM 归档实测), +# autosetup -n 与之匹配(EUR ROS-humble-3 同包用 -n %{commit} 构建成功证实) +Source0: https://github.com/tier4/nebula/archive/%{commit}.tar.gz + +# ROS /opt 前缀:关闭 debug 子包、摘除 python 字节码 brp、豁免自动依赖扫描 +%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}/.*$ + +# 单包策略:虚拟别名兼容依赖方,严禁拆实体 -devel 子包(路径重叠致安装事务冲突,spec-rules §7) +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +# ROS 依赖(均有清单依据,非幻觉): +# ament-cmake —— SIG 已移植(embedded 附加源) +# autoware-cmake —— buildtool_depend,embedded 附加源有 +# nebula-core-common —— package.xml <depend>,embedded 附加源有 +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: ros-%{ros_distro}-ament-cmake +BuildRequires: ros-%{ros_distro}-autoware-cmake +BuildRequires: ros-%{ros_distro}-nebula-core-common + +# 运行时 Requires(ROS /opt 被 __requires_exclude_from 豁免,autodeps 扫不到,必须手写) +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +# ament_export_dependencies 导出 nebula_core_common,消费方构建期需此包 +Requires: ros-%{ros_distro}-nebula-core-common + +%description +Nebula HW Interfaces Base — header-only INTERFACE library providing hardware +interface abstractions (UDP, TCP, CAN, HTTP) for the Nebula sensor driver +framework, built into /opt/ros/%{ros_distro}. + +%prep +# 归档根目录为纯 commit SHA(spec-rules §2 + SRPM 内归档实测),autosetup -n 与之匹配 +%autosetup -n %{commit} + +%build +# ROS 基座环境(chroot 未装 setup.sh 时用 [ -f ] 守卫,避免严格 sh 中止整个 %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} + +# monorepo 子包,CMakeLists 在 src/nebula_core/nebula_core_hw_interfaces +cd src/nebula_core/nebula_core_hw_interfaces +mkdir -p .obj +cd .obj +# 显式 out-of-source 构建(避免 openEuler %cmake 宏位置参数坑,spec-rules §5) +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 -DTESTING=OFF -DCMAKE_SUPPRESS_REGENERATION=ON +%make_build + +%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 src/nebula_core/nebula_core_hw_interfaces/.obj +make install DESTDIR=%{buildroot} + +%files +%license LICENSE +# 整树拥有(SIG 模板标准,对「装了没打包」类错误免疫,spec-rules §7) +/opt/ros/%{ros_distro} + +%changelog +* Wed Sep 23 2026 AI Importer <ai-importer@opencode.local> - 1.2.0-1 +- 初始引入 ros-humble-nebula-core-hw-interfaces(ament_cmake / autoware_cmake 形态)。 +- 源自 tier4/nebula monorepo commit 26749c80(branch main),子包 src/nebula_core/nebula_core_hw_interfaces。 +- 构建 header-only INTERFACE 库 nebula_core_hw_interfaces,安装硬件接口头文件与 CMake 导出。 |
