diff options
author | CoprDistGit <infra@openeuler.org> | 2025-03-08 14:15:54 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-03-08 14:15:54 +0000 |
commit | 70890099db03daedfe8eb243ed852f709a09d821 (patch) | |
tree | 3159f9c5fc904bdbac213e812f49efa435d13ee1 | |
parent | d9dc297b1308eca42aaf7da01a39f4669a09a159 (diff) |
automatic import of ros-humble-mimick-vendoropeneuler24.03_LTS
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 0-mimick-vendor-change-cmake-download.patch | 20 | ||||
-rw-r--r-- | mimick-vendor.spec | 108 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 132 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz +/ros-humble-mimick-vendor_0.2.8.orig.tar.gz diff --git a/0-mimick-vendor-change-cmake-download.patch b/0-mimick-vendor-change-cmake-download.patch new file mode 100644 index 0000000..8ac742f --- /dev/null +++ b/0-mimick-vendor-change-cmake-download.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e0632bc..907958e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,11 +58,11 @@ macro(build_mimick) + endif() + + include(ExternalProject) +- set(mimick_version "de11f8377eb95f932a03707b583bf3d4ce5bd3e7") + externalproject_add(mimick-${mimick_version} +- GIT_REPOSITORY https://github.com/ros2/Mimick.git +- GIT_TAG ${mimick_version} +- GIT_CONFIG advice.detachedHead=false ++ URL ${CMAKE_CURRENT_SOURCE_DIR}/Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz ++ PATCH_COMMAND ++ patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/0-Mimick-remove-compile-flag-o0.patch ++ COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/1-Mimick-add-riscv64-support.patch + # Suppress git update due to https://gitlab.kitware.com/cmake/cmake/-/issues/16419 + UPDATE_COMMAND "" + TIMEOUT 6000 diff --git a/mimick-vendor.spec b/mimick-vendor.spec new file mode 100644 index 0000000..21f92e1 --- /dev/null +++ b/mimick-vendor.spec @@ -0,0 +1,108 @@ +%bcond_without tests +%bcond_without weak_deps + +%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}/.*$ + +%define RosPkgName mimick-vendor +%define ros_distro humble + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 0.2.8 +Release: 1%{?dist}%{?release_suffix} +Summary: ROS mimick-vendor package + +Url: https://github.com/Snaipe/Mimick +License: Apache License 2.0 and MIT +Source0: %{name}_%{version}.orig.tar.gz +Source1: Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz +Patch0: 0-mimick-vendor-change-cmake-download.patch + +Requires: ros-%{ros_distro}-ros-workspace + +BuildRequires: ros-%{ros_distro}-ament-cmake +BuildRequires: git +BuildRequires: ros-%{ros_distro}-ros-workspace + +%if 0%{?with_tests} +BuildRequires: ros-%{ros_distro}-ament-lint-auto +BuildRequires: ros-%{ros_distro}-ament-lint-common +%endif + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description + + Wrapper around mimick, it provides an ExternalProject build of mimick. + + +%prep +%autosetup -p1 +cp %{SOURCE1} . +cp ${RPM_SOURCE_DIR}/0-Mimick-remove-compile-flag-o0.patch . +# riscv64 support patch from https://github.com/Snaipe/Mimick/pull/34 +cp ${RPM_SOURCE_DIR}/1-Mimick-add-riscv64-support.patch . + +%build +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} +%cmake3 \ + -UINCLUDE_INSTALL_DIR \ + -ULIB_INSTALL_DIR \ + -USYSCONF_INSTALL_DIR \ + -USHARE_INSTALL_PREFIX \ + -ULIB_SUFFIX \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ + -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ +%if !0%{?with_tests} + -DBUILD_TESTING=OFF \ +%endif + .. + +%make_build + +%install +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +%make_install -C .obj-%{_target_platform} + +%if 0%{?with_tests} +%check +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# Look for a Makefile target with a name indicating that it runs tests +TEST_TARGET=$(%__make -qp -C .obj-%{_target_platform} | sed "s/^\(test\|check\):.*/\\1/;t f;d;:f;q0") +if [ -n "$TEST_TARGET" ]; then +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +CTEST_OUTPUT_ON_FAILURE=1 \ + %make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED" +else echo "RPM TESTS SKIPPED"; fi +%endif + +%files +/opt/ros/%{ros_distro} + +%changelog +* Thu May 04 2023 Geoffrey Biggs geoff@openrobotics.org - 0.2.8-1 +- Autogenerated by ros-porting-tools @@ -0,0 +1,2 @@ +94d0a11f08f54eca30742f6ecfbffba8 Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz +dcb61ba0803df3a2b5eaa1d5573c4140 ros-humble-mimick-vendor_0.2.8.orig.tar.gz |