summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoware-utils-debug.spec11
-rw-r--r--sources2
2 files changed, 12 insertions, 1 deletions
diff --git a/autoware-utils-debug.spec b/autoware-utils-debug.spec
index 2eee136..60b8524 100644
--- a/autoware-utils-debug.spec
+++ b/autoware-utils-debug.spec
@@ -10,6 +10,10 @@ Source0: https://github.com/autowarefoundation/autoware_utils/archive/ref
# topdir after --transform: autoware-utils-debug-1.11.0/
# sub-package source dir: autoware_utils_debug/
+# ROS 包不做自动依赖扫描(.so 全在 /opt/ros 下,由 ament 间接依赖模型替代)
+%global __provides_exclude_from ^/opt/ros/humble/.*$
+%global __requires_exclude_from ^/opt/ros/humble/.*$
+
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: ros-humble-ament-cmake-auto
@@ -27,6 +31,7 @@ Requires: ros-humble-autoware-internal-debug-msgs
Requires: ros-humble-autoware-internal-msgs
Requires: ros-humble-autoware-utils-system
Requires: fmt
+Requires: ros-humble-ros-workspace
%description
The autoware_utils_debug package provides essential utilities for debug
@@ -51,11 +56,17 @@ Header files and CMake integration files for %{name}.
%autosetup -n %{name}-%{version}
%build
+# ROS 基座环境:让系统 Python 找到 ROS 安装的 ament_package 等模块
+[ -f /opt/ros/humble/setup.sh ] && source /opt/ros/humble/setup.sh || true
+export PYTHONPATH=/opt/ros/humble/lib/python3.11/site-packages${PYTHONPATH:+:$PYTHONPATH}
+export PKG_CONFIG_PATH=/opt/ros/humble/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
mkdir -p build_pkg
cd build_pkg
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/ros/humble \
+ -DAMENT_PREFIX_PATH="/opt/ros/humble" \
+ -DCMAKE_PREFIX_PATH="/opt/ros/humble" \
-DBUILD_TESTING=OFF \
../autoware_utils_debug
%make_build
diff --git a/sources b/sources
index dfe9f84..0253f50 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b5aa1f36a3152586169420dd0b950917 autoware-utils-debug-1.11.0.tar.gz
+27e074f85d64165fcaed1e665fd09282 autoware-utils-debug-1.11.0.tar.gz