草稿
[WIP]Update angles to 1.15.0 #21
Wanming Hu创建于 4月8日
[WIP]Update angles to 1.15.0 #21
草稿
共 3 个文件变更+12-22
| @@ -1,13 +1,14 @@ | |||
| 1 | %bcond_without tests | 1 | %bcond_without tests |
| 2 | %bcond_without weak_deps | 2 | %bcond_without weak_deps |
| 3 | 3 | ||
| 4 | +%define ros_distro humble | ||
| 5 | + | ||
| 4 | %global debug_package %{nil} | 6 | %global debug_package %{nil} |
| 5 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') | 7 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') |
| 6 | %global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ | 8 | %global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ |
| 7 | %global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ | 9 | %global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ |
| 8 | 10 | ||
| 9 | %define RosPkgName angles | 11 | %define RosPkgName angles |
| 10 | -%define ros_distro humble | ||
| 11 | 12 | ||
| 12 | Name: ros-%{ros_distro}-%{RosPkgName} | 13 | Name: ros-%{ros_distro}-%{RosPkgName} |
| 13 | Version: 1.15.0 | 14 | Version: 1.15.0 |
| @@ -16,7 +17,7 @@ Summary: ROS angles package | |||
| 16 | 17 | ||
| 17 | Url: http://wiki.ros.org/angles | 18 | Url: http://wiki.ros.org/angles |
| 18 | License: BSD | 19 | License: BSD |
| 19 | -Source0: %{name}_%{version}.orig.tar.gz | 20 | +Source0: %{RosPkgName}-%{version}.tar.gz |
| 20 | 21 | ||
| 21 | Requires: ros-%{ros_distro}-ament-cmake | 22 | Requires: ros-%{ros_distro}-ament-cmake |
| 22 | Requires: ros-%{ros_distro}-ros-workspace | 23 | Requires: ros-%{ros_distro}-ros-workspace |
| @@ -45,11 +46,9 @@ This package provides a set of simple math utilities to work | |||
| 45 | major changes in the near future. | 46 | major changes in the near future. |
| 46 | 47 | ||
| 47 | %prep | 48 | %prep |
| 48 | -%autosetup -p1 | 49 | +%autosetup -n %{RosPkgName}-%{version} -p1 |
| 49 | 50 | ||
| 50 | %build | 51 | %build |
| 51 | -# Needed to bootstrap since the ros_workspace package does not yet exist. | ||
| 52 | -export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages | ||
| 53 | 52 | ||
| 54 | # In case we're installing to a non-standard location, look for a setup.sh | 53 | # In case we're installing to a non-standard location, look for a setup.sh |
| 55 | # in the install tree and source it. It will set things like | 54 | # in the install tree and source it. It will set things like |
| @@ -66,37 +65,28 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} | |||
| 66 | -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ | 65 | -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ |
| 67 | -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ | 66 | -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ |
| 68 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | 67 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ |
| 69 | -%if !0%{?with_tests} | ||
| 70 | - -DBUILD_TESTING=OFF \ | ||
| 71 | -%endif | ||
| 72 | .. | 68 | .. |
| 73 | 69 | ||
| 74 | -%make_build | 70 | +make %{?_smp_mflags} |
| 75 | 71 | ||
| 76 | %install | 72 | %install |
| 77 | -# Needed to bootstrap since the ros_workspace package does not yet exist. | ||
| 78 | -export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages | ||
| 79 | - | ||
| 80 | # In case we're installing to a non-standard location, look for a setup.sh | 73 | # In case we're installing to a non-standard location, look for a setup.sh |
| 81 | # in the install tree and source it. It will set things like | 74 | # in the install tree and source it. It will set things like |
| 82 | # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | 75 | # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 83 | if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi | 76 | if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi |
| 84 | -%make_install -C .obj-%{_target_platform} | 77 | +cd .obj-%{_target_platform} |
| 78 | +make install DESTDIR=%{buildroot} | ||
| 85 | 79 | ||
| 86 | %if 0%{?with_tests} | 80 | %if 0%{?with_tests} |
| 87 | %check | 81 | %check |
| 88 | -# Needed to bootstrap since the ros_workspace package does not yet exist. | 82 | +# Look for a directory with a name indicating that it contains tests |
| 89 | -export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages | 83 | +TEST_TARGET=$(ls -d * | grep -m1 "\(test\|tests\)" ||:) |
| 90 | - | 84 | +if [ -n "$TEST_TARGET" ] && %__python3 -m pytest --version; then |
| 91 | -# Look for a Makefile target with a name indicating that it runs tests | ||
| 92 | -TEST_TARGET=$(%__make -qp -C .obj-%{_target_platform} | sed "s/^\(test\|check\):.*/\\1/;t f;d;:f;q0") | ||
| 93 | -if [ -n "$TEST_TARGET" ]; then | ||
| 94 | # In case we're installing to a non-standard location, look for a setup.sh | 85 | # In case we're installing to a non-standard location, look for a setup.sh |
| 95 | # in the install tree and source it. It will set things like | 86 | # in the install tree and source it. It will set things like |
| 96 | # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | 87 | # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
| 97 | if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi | 88 | if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi |
| 98 | -CTEST_OUTPUT_ON_FAILURE=1 \ | 89 | +%__python3 -m pytest $TEST_TARGET || echo "RPM TESTS FAILED" |
| 99 | - %make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED" | ||
| 100 | else echo "RPM TESTS SKIPPED"; fi | 90 | else echo "RPM TESTS SKIPPED"; fi |
| 101 | %endif | 91 | %endif |
| 102 | 92 | ||
| @@ -104,5 +94,5 @@ else echo "RPM TESTS SKIPPED"; fi | |||
| 104 | /opt/ros/%{ros_distro} | 94 | /opt/ros/%{ros_distro} |
| 105 | 95 | ||
| 106 | %changelog | 96 | %changelog |
| 107 | -* Thu May 04 2023 Tully Foote tfoote@osrfoundation.org - 1.15.0-1 | 97 | +* Fri Apr 03 2026 Tully Foote tfoote@osrfoundation.org - 1.15.0-1 |
| 108 | - Autogenerated by ros-porting-tools | 98 | - Autogenerated by ros-porting-tools |
Binary files do not support preview