summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-30 02:25:30 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-30 02:25:30 +0000
commitaefa59ffdabb3fbd485d6f4f6e0c4beb0b8a5a90 (patch)
treee3d23d524ef89fb61c8f8edcd95d09d9dd397599
parentc839df9cd33ae60af006586f96432ce569904277 (diff)
automatic import of ros-humble-fss-bringup
-rw-r--r--.gitignore1
-rw-r--r--fss-bringup.spec89
-rw-r--r--sources1
3 files changed, 91 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..9c0f477 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/673ba44eaa1a4054747775ee1f1cdd3a8b8a9bbc.tar.gz
diff --git a/fss-bringup.spec b/fss-bringup.spec
new file mode 100644
index 0000000..5420dcc
--- /dev/null
+++ b/fss-bringup.spec
@@ -0,0 +1,89 @@
+# ROS spec:fss-bringup
+# FastSwarmSim monorepo 中的集成 launch 包,ament_cmake 形态,纯数据/launch 包
+# 严格遵循 /app/.claude/skills/build-rpm/spec-rules-ros.md
+
+%define ros_distro humble
+%define RosPkgName fss-bringup
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 0.1.2
+Release: 1%{?dist}
+Summary: Integrated launch files for FastSwarmSim.
+License: BSD-3-Clause
+URL: https://github.com/shupx/FastSwarmSim
+
+# 构建系统从本地 sources/ 打 tarball,根目录名 = Source0 文件名去扩展名
+# = %{commit}(纯完整 SHA,非 GitHub 归档的 FastSwarmSim-<SHA>;§2 build550/551)
+%global commit 673ba44eaa1a4054747775ee1f1cdd3a8b8a9bbc
+Source0: https://github.com/shupx/FastSwarmSim/archive/%{commit}.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: ros-%{ros_distro}-ament-cmake
+
+# 运行时 Requires(ROS 特有,必须手写):/opt/ros 被 __requires_exclude_from 豁免、
+# autodeps 扫不到,少了这些 Requires 装上后环境不就绪
+Requires: ros-%{ros_distro}-ros-workspace
+Requires: ros-%{ros_distro}-ament-cmake
+# package.xml <exec_depend>:同 session 同 COPR project 构建的兄弟包
+Requires: ros-%{ros_distro}-fss-px4-sim
+Requires: ros-%{ros_distro}-fss-sensing
+Requires: ros-%{ros_distro}-fss-time
+# package.xml <exec_depend>:官方 ROS 包(ros-projects/ros-upstream 清单已核对)
+Requires: ros-%{ros_distro}-launch
+Requires: ros-%{ros_distro}-launch-ros
+Requires: ros-%{ros_distro}-rviz2
+
+# 单包策略:ROS 包严禁拆实体子包,改用虚拟别名兼容依赖方
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Integrated launch files for FastSwarmSim. This package provides launch files and
+RViz configuration for the FastSwarmSim multi-drone simulation stack, built for
+the ROS 2 %{ros_distro} distribution and installed under /opt/ros/%{ros_distro}.
+
+%prep
+%autosetup -n %{commit}
+
+%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}
+
+# 包位于 monorepo 子目录 src/fss_bringup;显式 out-of-source 构建
+# (避免 spec 顶层直接 %cmake 的位置参数坑——openEuler %cmake 宏带位置
+# 参数时会错误解析源码目录,build 444 实踩)
+cd src/fss_bringup
+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 \
+ ..
+make %{?_smp_mflags}
+
+%install
+cd src/fss_bringup/.obj
+make install DESTDIR=%{buildroot}
+
+%files
+# 整树拥有:对「装了没打包」类错误免疫(SIG 模板标准做法)
+/opt/ros/%{ros_distro}
+
+%changelog
+* Wed Sep 30 2026 Peixuan Shu <shupeixuan@qq.com> - 0.1.2-1
+- Initial RPM package of fss-bringup for openEuler ROS %{ros_distro}
diff --git a/sources b/sources
new file mode 100644
index 0000000..146588c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f0284e62f4053409163a7456bc7d7ea3 673ba44eaa1a4054747775ee1f1cdd3a8b8a9bbc.tar.gz