summaryrefslogtreecommitdiff
path: root/autoware-utils-debug.spec
blob: c4fd8864b2fc3a6e8ebfb05913d2a21b404515dc (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
95
96
97
98
99
100
101
102
103
104
105
106
Name:           autoware-utils-debug
Version:        1.11.0
Release:        2%{?dist}
Summary:        Utilities for debug in Autoware (ROS 2 Humble)

License:        Apache-2.0
URL:            https://github.com/autowarefoundation/autoware_utils
Source0:        https://github.com/autowarefoundation/autoware_utils/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

# 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
BuildRequires:  ros-humble-autoware-cmake
BuildRequires:  ros-humble-rclcpp-devel
BuildRequires:  ros-humble-diagnostic-msgs-devel
BuildRequires:  ros-humble-autoware-internal-debug-msgs-devel
BuildRequires:  ros-humble-autoware-internal-msgs-devel
BuildRequires:  ros-humble-autoware-utils-system-devel
BuildRequires:  fmt-devel

Requires:       ros-humble-rclcpp
Requires:       ros-humble-diagnostic-msgs
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
in Autoware autonomous driving applications built on ROS 2 Humble.
It includes helpers for publishing debug messages with timestamps,
tracking processing times, and reporting diagnostic information.

%package devel
Summary:        Development files for %{name}
Requires:       %{name} = %{version}-%{release}
Requires:       ros-humble-rclcpp-devel
Requires:       ros-humble-diagnostic-msgs-devel
Requires:       ros-humble-autoware-internal-debug-msgs-devel
Requires:       ros-humble-autoware-internal-msgs-devel
Requires:       ros-humble-autoware-utils-system-devel
Requires:       fmt-devel

%description devel
Header files and CMake integration files for %{name}.

%prep
%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

%install
cd build_pkg
%make_install

%files
# LICENSE 在仓库根(autoware-utils-debug-1.11.0/LICENSE),不在子包目录
%license LICENSE
%doc autoware_utils_debug/README.md
# ROS ament 库不版本化(无 SOVERSION),实际只产出 libautoware_utils_debug.so
/opt/ros/humble/lib/libautoware_utils_debug.so
# ament 资源索引(package_run_dependencies / parent_prefix_path / packages 三处)
/opt/ros/humble/share/ament_index/resource_index/*/autoware_utils_debug
# 运行时环境脚本与 local_setup
/opt/ros/humble/share/autoware_utils_debug/environment/
/opt/ros/humble/share/autoware_utils_debug/local_setup.*
/opt/ros/humble/share/autoware_utils_debug/package.dsv
/opt/ros/humble/share/autoware_utils_debug/package.xml

%files devel
# 头文件
/opt/ros/humble/include/autoware_utils_debug/
# ament cmake 配置实际安装在 share/<pkg>/cmake/ 下(不是 lib/cmake)
/opt/ros/humble/share/autoware_utils_debug/cmake/

%changelog
* Wed Sep 23 2026 openEuler Builder <builder@openeuler.org> - 1.11.0-2
- Fix %%files: libautoware_utils_debug.so is unversioned (ROS ament), LICENSE
  is at repo root, cmake config lives in share/<pkg>/cmake not lib/cmake;
  split runtime (lib + share env/local_setup/package) into main, cmake config
  into devel to avoid double-listed files.

* Sun Sep 20 2026 openEuler Builder <builder@openeuler.org> - 1.11.0-1
- Initial package of autoware_utils_debug 1.11.0