summaryrefslogtreecommitdiff
path: root/bno055.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-18 07:24:51 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-18 07:24:51 +0000
commit7dcc6a66446fe0c0bd1574220b6eb56a2f2be3b9 (patch)
tree63580c4ba45b1e92244bbe337daa1ea4b2a0f638 /bno055.spec
parentf54cc18f5057df3139e0fdee9e3ae197581ffd2b (diff)
automatic import of ros-humble-bno055openeuler24.03_LTS
Diffstat (limited to 'bno055.spec')
-rw-r--r--bno055.spec64
1 files changed, 64 insertions, 0 deletions
diff --git a/bno055.spec b/bno055.spec
new file mode 100644
index 0000000..c47b833
--- /dev/null
+++ b/bno055.spec
@@ -0,0 +1,64 @@
+%define ros_distro humble
+%define RosPkgName bno055
+%define src_version 0.5.0-1
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 0.5.0
+Release: 1%{?dist}
+Summary: Bosch BNO055 IMU driver for ROS2
+License: BSD
+URL: https://github.com/flynneva/bno055/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: ros-%{ros_distro}-example-interfaces
+BuildRequires: ros-%{ros_distro}-rclpy
+BuildRequires: ros-%{ros_distro}-std-msgs
+BuildRequires: python3-pyserial
+# python3-smbus 在 openEuler 尚不存在,需先单独引入
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+Requires: ros-%{ros_distro}-ros-workspace
+Requires: ros-%{ros_distro}-ament-cmake
+Requires: ros-%{ros_distro}-example-interfaces
+Requires: ros-%{ros_distro}-rclpy
+Requires: ros-%{ros_distro}-std-msgs
+Requires: python3-pyserial
+# python3-smbus 在 openEuler 尚不存在,需先单独引入后再启用此依赖
+
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Bosch BNO055 IMU driver for ROS2
+
+%prep
+%autosetup -n %{RosPkgName}-%{src_version}
+
+%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 --root %{buildroot} \
+ --prefix /opt/ros/%{ros_distro} \
+ --install-lib /opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages \
+ --single-version-externally-managed --record installed.txt
+
+%files
+/opt/ros/%{ros_distro}
+
+%changelog
+* Fri Sep 18 2026 ai-importer <ai-importer@openeuler.org> - 0.5.0-1
+- Initial import (ROS batch)