diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-09-23 09:08:13 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-09-23 09:08:13 +0000 |
| commit | aa00791a6c6adbff467cd8a615e1ab94b3ccf6de (patch) | |
| tree | 4f2c7605e4aab1c6bafd5cb8fc9086e2acdaa1fa /nebula-hesai-hw-interfaces.spec | |
| parent | 6effb70e79dfcf7193f0f2390af44d2b69ef54bf (diff) | |
automatic import of ros-humble-nebula-hesai-hw-interfacesopeneuler24.03_LTS_SP3
Diffstat (limited to 'nebula-hesai-hw-interfaces.spec')
| -rw-r--r-- | nebula-hesai-hw-interfaces.spec | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/nebula-hesai-hw-interfaces.spec b/nebula-hesai-hw-interfaces.spec new file mode 100644 index 0000000..2da9453 --- /dev/null +++ b/nebula-hesai-hw-interfaces.spec @@ -0,0 +1,114 @@ +# ROS spec:nebula-hesai-hw-interfaces +# 上游:tier4/nebula monorepo(https://github.com/tier4/nebula,branch main) +# 本包为 monorepo 子包,源码位于 src/nebula_hesai/nebula_hesai_hw_interfaces/ +# 构建形态:ament_cmake(buildtool 依赖 autoware_cmake + ros_environment) +# 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-hesai-hw-interfaces +%global commit 26749c80dff89f39000a9817141143c05ec151ab + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 1.2.0 +Release: 1%{?dist} +Summary: Nebula Hesai Hardware Interfaces Library +License: Apache-2.0 +URL: https://github.com/tier4/nebula +# 实测 SRPM 内捆绑归档解压根目录为纯 commit SHA(spec-rules §2:GitHub commit 归档根=纯 SHA, +# build 550 用 nebula-<sha> 失败、551 改 %%{commit} 成功;rpmbuild -bs 不跑 %%prep 故兄弟包的 +# nebula-<sha> 写法从未被实测打回,此处置信 spec-rules §2 + SRPM 归档实测),故 -n 与之匹配 +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 子包(路径重叠致安装事务冲突) +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +# ROS 依赖(均有清单依据,非幻觉): +# ament-cmake / ros-environment —— embedded 附加源(eulermaker)有 +# autoware-cmake / nebula-core-common —— embedded 附加源有(provides 连字符名) +# nebula-core-hw-interfaces —— EUR ROS-humble-3 有二进制(1.2.0-1),本批构建 +# nebula_hesai_common —— embedded 附加源有(下划线包名,provides 下划线名) +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: ros-%{ros_distro}-ament-cmake +BuildRequires: ros-%{ros_distro}-autoware-cmake +BuildRequires: ros-%{ros_distro}-ros-environment +BuildRequires: ros-%{ros_distro}-nebula-core-common +BuildRequires: ros-%{ros_distro}-nebula-core-hw-interfaces +# EUR embedded 附加源(eulermaker openEuler-Embedded-ROS2-humble-release3)的 +# 二进制包名为下划线形态 ros-humble-nebula_hesai_common,不 provides 连字符 +# 形态 ros-humble-nebula-hesai-common(nebula_core_common 则 provides 连字符名)。 +# 改用下划线 capability 名匹配 embedded 源的 Provides。 +BuildRequires: ros-%{ros_distro}-nebula_hesai_common + +# 系统依赖(package.xml <depend>boost</depend>,CMakeLists find_package(Boost)) +BuildRequires: boost-devel + +# 运行时 Requires(ROS /opt 被 __requires_exclude_from 豁免,autodeps 扫不到,必须手写) +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +# libnebula_hesai_hw_interfaces.so 经 ament_target_dependencies 链接这些兄弟库,运行期须就绪; +# ament_export_dependencies 导出 nebula_core_common/nebula_hesai_common/nebula_core_hw_interfaces/Boost +Requires: ros-%{ros_distro}-nebula-core-common +Requires: ros-%{ros_distro}-nebula-core-hw-interfaces +# 与 BuildRequires 同步:embedded 附加源二进制为下划线包名 +Requires: ros-%{ros_distro}-nebula_hesai_common +# ament_export_dependencies 导出 Boost,消费方构建期需 boost-devel +Requires: boost-devel + +%description +Nebula Hesai Hardware Interfaces Library. ament_cmake package (autoware_cmake +buildtool) providing the shared library libnebula_hesai_hw_interfaces.so, the +Hesai LiDAR hardware interface abstraction for the Nebula LiDAR driver stack, +built into /opt/ros/%{ros_distro}. + +%prep +# 归档根目录为纯 commit SHA(spec-rules §2 + SRPM 内归档实测),autosetup -n 与之匹配 +%autosetup -n %{commit} -p1 + +%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_hesai/nebula_hesai_hw_interfaces +cd src/nebula_hesai/nebula_hesai_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_hesai/nebula_hesai_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-hesai-hw-interfaces(ament_cmake / autoware_cmake 形态)。 +- 源自 tier4/nebula monorepo commit 26749c80(branch main),子包 src/nebula_hesai/nebula_hesai_hw_interfaces。 +- 构建 SHARED 库 libnebula_hesai_hw_interfaces.so,安装 Hesai 硬件接口与头文件。 |
