summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--sources1
-rw-r--r--system-webview.spec81
3 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f149c56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/system-webview-0.0.3-1.tar.gz
diff --git a/sources b/sources
new file mode 100644
index 0000000..5286b30
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3c505521e78218cfa4e03fa42d8fce10 system-webview-0.0.3-1.tar.gz
diff --git a/system-webview.spec b/system-webview.spec
new file mode 100644
index 0000000..a60421e
--- /dev/null
+++ b/system-webview.spec
@@ -0,0 +1,81 @@
+%define ros_distro humble
+%define RosPkgName system-webview
+%define src_version 0.0.3-1
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 0.0.3
+Release: 1%{?dist}
+Summary: Real-time web-based system webview for ROS 2 — CPU, memory, swap, load average,
+License: MIT
+URL: https://github.com/namo-robotics/ros2_system_webview/tree/main
+Source0: %{RosPkgName}-%{src_version}.tar.gz
+
+%global debug_package %{nil}
+%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
+%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$
+%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$
+
+BuildRequires: cmake
+BuildRequires: ros-%{ros_distro}-ament-cmake
+BuildRequires: ros-%{ros_distro}-ament-index-cpp
+BuildRequires: ros-%{ros_distro}-rclcpp
+BuildRequires: ros-%{ros_distro}-rosbridge-server
+BuildRequires: pkgconfig
+# 上游 package.xml 写的是 Debian 名 libcpp-httplib-dev;openEuler 对应
+# cpp-httplib-devel(提供 /usr/include/httplib.h + cmake(httplib) + libcpp-httplib.so)。
+# 该包编入 OpenSSL/ZLIB/Brotli,其 cmake 配置会 find_dependency 这三者,
+# 故必须一并声明对应的 -devel 包(缺任一个 find_package(httplib) 即失败)。
+BuildRequires: cpp-httplib-devel
+BuildRequires: openssl-devel
+BuildRequires: zlib-devel
+BuildRequires: brotli-devel
+
+Requires: ros-%{ros_distro}-ros-workspace
+Requires: ros-%{ros_distro}-ament-cmake
+Requires: ros-%{ros_distro}-ament-index-cpp
+Requires: ros-%{ros_distro}-rclcpp
+Requires: ros-%{ros_distro}-rosbridge-server
+Requires: pkgconfig
+Requires: cpp-httplib-devel
+Requires: openssl-devel
+Requires: zlib-devel
+Requires: brotli-devel
+
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Real-time web-based system webview for ROS 2 — CPU, memory, swap, load average, and /rosout log viewer
+
+%prep
+%autosetup -n %{RosPkgName}-%{src_version}
+
+%build
+[ -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}
+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 -DTESTING=OFF -DCMAKE_SUPPRESS_REGENERATION=ON \
+ ..
+make %{?_smp_mflags}
+
+%install
+[ -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 .obj
+make install DESTDIR=%{buildroot}
+
+%files
+/opt/ros/%{ros_distro}
+
+%changelog
+* Mon Sep 21 2026 ai-importer <ai-importer@openeuler.org> - 0.0.3-1
+- Initial import (ROS batch)