blob: 852085c50f42d9929ca1ecb196764717ed8dc2e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
%define ros_distro humble
%define RosPkgName nebula-velodyne-decoders
%define src_version 1.3.1-1
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 1.3.1
Release: 1%{?dist}
Summary: Nebula Velodyne Decoders Library
License: Apache 2
URL: https://github.com/tier4/nebula/tree/main
Source0: %{RosPkgName}-%{src_version}.tar.gz
%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}/.*$
# AI 兜底生成:monorepo 多级嵌套,package.xml 位于
# src/nebula_velodyne/nebula_velodyne_decoders/,gen_ros_spec 模板的
# parse_package_xml 仅扫一级子目录无法定位 → needs_llm 转人工。
# 依赖分类仍沿用 analyze_ros_deps.classify_deps 同源函数(依据
# ros-projects.list / ros-upstream.list / pkg.remap,零幻觉):
# - angles / rclcpp / ros-environment / velodyne-msgs:ros-projects.list(SIG 已有)
# - autoware-cmake / nebula-core-common / nebula-core-decoders /
# nebula-velodyne-common:ros-upstream.list(rosdistro 真实存在,
# 注册递归构建;其中三个 nebula 兄弟为 reuse_copr_project 已有 provider)
# - boost:pkg.remap 映射为 boost-devel(基础源实证 boost-devel-1.83.0)
# buildtool_depend(autoware_cmake/ros_environment) 一并写 BuildRequires。
BuildRequires: cmake
BuildRequires: ros-humble-ament-cmake
BuildRequires: ros-humble-angles
BuildRequires: ros-humble-rclcpp
BuildRequires: ros-humble-ros-environment
BuildRequires: ros-humble-velodyne-msgs
BuildRequires: ros-humble-autoware-cmake
BuildRequires: ros-humble-nebula-core-common
BuildRequires: ros-humble-nebula-core-decoders
BuildRequires: ros-humble-nebula-velodyne-common
BuildRequires: boost-devel
# 运行时 Requires 三件套(spec-rules-ros §6):ros-workspace 提供
# /opt/ros/<distro>/setup.sh;ament-cmake 提供 ament 运行期钩子。
# 其余为 package.xml <depend>(build+exec 双态)映射,不得降级 Recommends。
Requires: ros-humble-ros-workspace
Requires: ros-humble-ament-cmake
Requires: ros-humble-angles
Requires: ros-humble-rclcpp
Requires: ros-humble-velodyne-msgs
Requires: ros-humble-nebula-core-common
Requires: ros-humble-nebula-core-decoders
Requires: ros-humble-nebula-velodyne-common
Requires: boost-devel
Provides: %{name}-devel = %{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}
Provides: %{name}-runtime = %{version}-%{release}
%description
Nebula Velodyne Decoders Library
%prep
%autosetup -n %{RosPkgName}-%{src_version}
%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.txt 位于 src/nebula_velodyne/nebula_velodyne_decoders/
cd src/nebula_velodyne/nebula_velodyne_decoders
mkdir -p .obj && cd .obj
%cmake3 \
-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 %{?_smp_mflags}
%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_velodyne/nebula_velodyne_decoders
cd .obj
make install DESTDIR=%{buildroot}
%files
/opt/ros/%{ros_distro}
%changelog
* Wed Oct 21 2026 ai-importer <ai-importer@openeuler.org> - 1.3.1-1
- Initial import (ROS batch)
|