# ament_cmake: ROS 2 build system (ament_cmake build type) # Multi-package metapackage - builds all sub-packages in dependency order # topdir: ament-cmake-1.3.14 # Installs to /opt/ros/humble (ROS standard prefix) %global debug_package %{nil} %global __provides_exclude_from ^/opt/ros/humble/.*$ %global __requires_exclude_from ^/opt/ros/humble/.*$ # Strip brp-python-bytecompile (ROS Python files under /opt are not standard sitelib) %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') Name: ament-cmake Version: 1.3.14 Release: 1%{?dist} Summary: The entry point package for the ament buildsystem in CMake License: Apache-2.0 URL: https://github.com/ament/ament_cmake Source0: https://github.com/ament/ament_cmake/archive/1.3.14.tar.gz#/ament-cmake-1.3.14.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-catkin_pkg BuildRequires: ros-humble-ament-package BuildRequires: ros-humble-ros-workspace Requires: ros-humble-ament-package Requires: ros-humble-ros-workspace %description The entry point package for the ament buildsystem in CMake. This package provides CMake modules, macros, and Python scripts for building ROS 2 packages with the ament build system. It bundles all ament_cmake_* sub-packages (core, python, test, export_*, etc.) from the ament_cmake repository. %prep %autosetup -n %{name}-%{version} %build # Source ROS environment if available (provides PYTHONPATH, AMENT_PREFIX_PATH) [ -f /opt/ros/humble/setup.sh ] && source /opt/ros/humble/setup.sh || true export PYTHONPATH=/opt/ros/humble/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} export PKG_CONFIG_PATH=/opt/ros/humble/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} ROSPREFIX=/opt/ros/humble BROSEROOT=%{buildroot}/opt/ros/humble export AMENT_PREFIX_PATH=${BROSEROOT}:${ROSPREFIX} export CMAKE_PREFIX_PATH=${BROSEROOT}:${ROSPREFIX} CMAKE_FLAGS="\ -DCMAKE_INSTALL_PREFIX=${ROSPREFIX} \ -DAMENT_PREFIX_PATH=${ROSPREFIX} \ -DCMAKE_PREFIX_PATH=${ROSPREFIX} \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ -DBUILD_TESTING=OFF \ -UINCLUDE_INSTALL_DIR \ -ULIB_INSTALL_DIR \ -USYSCONF_INSTALL_DIR \ -USHARE_INSTALL_PREFIX \ -ULIB_SUFFIX" # Build and install a single sub-package to buildroot build_one() { pkg=$1 echo "=== Building ${pkg} ===" cd "${pkg}" mkdir -p build cd build cmake ${CMAKE_FLAGS} .. cmake --build . DESTDIR=%{buildroot} cmake --install . cd ../.. } # Layer 0: ament_cmake_core (self-contained, uses own cmake modules from source) build_one ament_cmake_core # Layer 1: packages depending only on ament_cmake_core for pkg in \ ament_cmake_export_definitions \ ament_cmake_export_dependencies \ ament_cmake_export_include_directories \ ament_cmake_export_interfaces \ ament_cmake_export_libraries \ ament_cmake_export_link_flags \ ament_cmake_export_targets \ ament_cmake_gen_version_h \ ament_cmake_gmock \ ament_cmake_gtest \ ament_cmake_include_directories \ ament_cmake_libraries \ ament_cmake_nose \ ament_cmake_python \ ament_cmake_target_dependencies \ ament_cmake_version do build_one "${pkg}" done # Layer 2: packages with intra-repo cross-dependencies # (ament_cmake_pytest needs ament_cmake_test, so test must come first) for pkg in \ ament_cmake_test \ ament_cmake_google_benchmark \ ament_cmake_vendor_package \ ament_cmake_pytest do build_one "${pkg}" done # Layer 3: ament_cmake (metapackage, re-exports sub-package dependencies) build_one ament_cmake # Layer 4: ament_cmake_auto (needs ament_cmake + ament_cmake_gmock + ament_cmake_gtest) build_one ament_cmake_auto %install # All sub-packages already installed to buildroot/opt/ros/humble during build phase %files /opt/ros/humble/ %changelog * Thu Oct 08 2026 openEuler Builder - 1.3.14-1 - Initial package