summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--pointcloud-to-ply.spec72
-rw-r--r--sources1
3 files changed, 74 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e7755c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pointcloud-to-ply-humble-devel.tar.gz
diff --git a/pointcloud-to-ply.spec b/pointcloud-to-ply.spec
new file mode 100644
index 0000000..409a9ff
--- /dev/null
+++ b/pointcloud-to-ply.spec
@@ -0,0 +1,72 @@
+%define ros_distro humble
+%define RosPkgName pointcloud-to-ply
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 0.0.2
+Release: 1%{?dist}
+Summary: Subscribe to a PointCloud2 topic, reconstruct a mesh, and save to OBJ/PLY.
+License: BSD
+URL: https://github.com/li9i/pointcloud-to-ply
+# branch 归档实测解压根目录为 pointcloud-to-ply-humble-devel
+Source0: https://github.com/li9i/pointcloud-to-ply/archive/refs/heads/humble-devel.tar.gz#/pointcloud-to-ply-humble-devel.tar.gz
+
+# debug 子包无意义(/opt 前缀),统一关闭
+%global debug_package %{nil}
+# /opt 下 python 字节码编译路径非常规,摘掉 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 下)
+%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$
+%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$
+
+# official_deps_rpm(manifest)
+BuildRequires: ros-%{ros_distro}-ament-cmake
+BuildRequires: ros-%{ros_distro}-rclpy
+BuildRequires: ros-%{ros_distro}-sensor-msgs
+# registered_deps(manifest)
+BuildRequires: python3-open3d
+# ament_python 构建工具
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+# 所有 ROS 包强制
+Requires: ros-%{ros_distro}-ros-workspace
+# exec_depend 运行时依赖
+Requires: ros-%{ros_distro}-rclpy
+Requires: ros-%{ros_distro}-sensor-msgs
+Requires: python3-open3d
+
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Subscribe to a PointCloud2 topic, reconstruct a mesh, and save to OBJ/PLY.
+
+%prep
+%autosetup -n pointcloud-to-ply-humble-devel
+
+%build
+source /opt/ros/%{ros_distro}/setup.sh 2>/dev/null || 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}
+%{__python3} setup.py build
+
+%install
+source /opt/ros/%{ros_distro}/setup.sh 2>/dev/null || 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}
+%{__python3} setup.py install --skip-build \
+ --prefix=/opt/ros/%{ros_distro} \
+ --install-lib=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages \
+ --install-scripts=/opt/ros/%{ros_distro}/lib/%{RosPkgName} \
+ --install-layout=rpm \
+ --single-version-externally-managed \
+ --record=installed.txt \
+ --root=%{buildroot}
+
+%files
+/opt/ros/%{ros_distro}/
+
+%changelog
+* Wed Sep 16 2026 ROS SIG <ros-sig@openeuler.org> - 0.0.2-1
+- Initial package for ros-%{ros_distro}-%{RosPkgName}
diff --git a/sources b/sources
new file mode 100644
index 0000000..a8ba6dc
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1a91790ba3fa904d627abfa49648607d pointcloud-to-ply-humble-devel.tar.gz