summaryrefslogtreecommitdiff
path: root/nebula-hesai-decoders.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-08 12:36:42 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-08 12:36:42 +0000
commit04d4cff2e1c0f70aaf352322312df409a28fd752 (patch)
tree264ac4d3d370ae56a18b4cf3ca8a6308c2fdeb37 /nebula-hesai-decoders.spec
parent93c18b400d1e0a1f3097b0cdefceb4ae233ccd72 (diff)
automatic import of ros-humble-nebula-hesai-decoders
Diffstat (limited to 'nebula-hesai-decoders.spec')
-rw-r--r--nebula-hesai-decoders.spec90
1 files changed, 90 insertions, 0 deletions
diff --git a/nebula-hesai-decoders.spec b/nebula-hesai-decoders.spec
new file mode 100644
index 0000000..425df67
--- /dev/null
+++ b/nebula-hesai-decoders.spec
@@ -0,0 +1,90 @@
+%define ros_distro humble
+%define RosPkgName nebula-hesai-decoders
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 1.2.0
+Release: 1%{?dist}
+Summary: Nebula Hesai Decoders Library
+License: Apache-2.0
+URL: https://github.com/tier4/nebula
+# 分支 main 快照(ros_fetch checkout HEAD),记录 commit 保证产物可追溯
+# GitHub /archive/<full-sha>.tar.gz 解压根目录为 nebula-<full-sha>(实测确认)
+%global commit 8ce64073f41c2ec1166334ce7f8fb2edc13c86e5
+Source0: https://github.com/tier4/nebula/archive/%{commit}.tar.gz
+
+# debug 子包无意义(/opt 前缀),SIG 模板统一关闭
+%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: make
+BuildRequires: gcc-c++
+BuildRequires: boost-devel
+# ament_cmake 构建工具(规则 §5:ament_cmake 形态强制)
+BuildRequires: ros-%{ros_distro}-ament-cmake
+# package.xml <buildtool_depend>:autoware_cmake(ros-upstream.list,SIG 未移植,递归构建兜底)
+BuildRequires: ros-%{ros_distro}-autoware-cmake
+# package.xml <buildtool_depend>:ros_environment(ros-projects.list,SIG 已有)
+BuildRequires: ros-%{ros_distro}-ros-environment
+# package.xml <depend>:rclcpp(ros-projects.list,SIG 已有)
+BuildRequires: ros-%{ros_distro}-rclcpp
+# package.xml <depend>:兄弟包(同 nebula 单仓,同 COPR project 构建)
+BuildRequires: ros-%{ros_distro}-nebula-core-common
+BuildRequires: ros-%{ros_distro}-nebula-core-decoders
+BuildRequires: ros-%{ros_distro}-nebula-hesai-common
+
+# 运行时 Requires(ROS 特有:/opt/ros 被 __requires_exclude_from 豁免,autodeps 扫不到,必须手写)
+Requires: ros-%{ros_distro}-ros-workspace
+Requires: ros-%{ros_distro}-ament-cmake
+Requires: ros-%{ros_distro}-rclcpp
+Requires: ros-%{ros_distro}-nebula-core-common
+Requires: ros-%{ros_distro}-nebula-core-decoders
+Requires: ros-%{ros_distro}-nebula-hesai-common
+Requires: boost-devel
+
+# 单包策略:严禁拆实体子包(路径重叠致安装事务冲突),用虚拟别名兼容依赖方
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Nebula Hesai Decoders Library — Hesai LiDAR decoder shared library from the
+TIER IV nebula project, built for ROS 2 %{ros_distro} under /opt/ros/%{ros_distro}.
+
+%prep
+%autosetup -n nebula-%{commit}
+
+%build
+# ROS 基座环境(chroot 可能无 setup.sh,用 [ -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}
+
+# 单仓多包:仅构建 src/nebula_hesai/nebula_hesai_decoders 子包
+cd src/nebula_hesai/nebula_hesai_decoders
+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
+cd src/nebula_hesai/nebula_hesai_decoders/.obj
+make install DESTDIR=%{buildroot}
+
+%files
+# %files 整树拥有(SIG 模板标准做法,对“装了没打包”类错误免疫)
+/opt/ros/%{ros_distro}
+
+%changelog
+* Thu Oct 08 2026 AI Importer <ai-importer@opencode.local> - 1.2.0-1
+- Initial RPM package for ros-humble-nebula-hesai-decoders