blob: 6dd9d60a98e33fda6969f378020184e99395d9c2 (
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
|
%define ros_distro humble
%define RosPkgName kuka-external-control-sdk
%global commit a5f81946a9d8079be4c20212622ced94da9811a2
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 2.0.0
Release: 1%{?dist}
Summary: Client libraries for external control interfaces of KUKA
License: Apache-2.0
URL: https://github.com/kroshu/kuka-external-control-sdk
# topdir: name-version (created via tar --transform from cloned git source)
Source0: %{name}-%{version}.tar.gz
# debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规),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: gcc-c++
BuildRequires: grpc-devel
BuildRequires: grpc-plugins
BuildRequires: protobuf-compiler
BuildRequires: protobuf-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: tinyxml2-devel
BuildRequires: ros-%{ros_distro}-ament-cmake
BuildRequires: ros-%{ros_distro}-tinyxml2-vendor
Requires: ros-%{ros_distro}-ros-workspace
Requires: ros-%{ros_distro}-ament-cmake
Provides: %{name}-devel = %{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}
Provides: %{name}-runtime = %{version}-%{release}
%description
Client libraries for external control interfaces of KUKA. This SDK provides
the Robot class and its IRobot interface for external control of KUKA robots,
supporting both iiQKA and KSS controllers via gRPC and UDP communication.
%prep
%autosetup -n %{name}-%{version}
%build
# ROS 基座环境(chroot 已配置 ROS SIG repo;无 ROS 依赖的包 buildroot 里
# 可能没有 setup.sh,必须用 [ -f ] 守卫——直接 source 不存在的文件在
# 严格 sh 下会中止整个 %build 脚本,|| true 挡不住)
[ -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 kuka_external_control_sdk
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 -DTESTING=OFF \
-DCMAKE_SUPPRESS_REGENERATION=ON
make %{?_smp_mflags}
%install
cd kuka_external_control_sdk/.obj
make install DESTDIR=%{buildroot}
%files
/opt/ros/%{ros_distro}
%changelog
* Tue Sep 29 2026 AI Importer <ai@openeuler.org> - 2.0.0-1
- Initial package for kuka-external-control-sdk 2.0.0
|