File ament_cppcheck.spec of Package ament_cppcheck

# ament_python template
%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/humble/.*$
%global __requires_exclude_from ^/opt/ros/humble/.*$

Name:           ros-humble-ament-cppcheck
Version:        0.12.15
Release:        1%{?dist}
Summary:        ROS ament_cppcheck package

License:        Apache License 2.0
Group:          Development/Libraries
Source0:        ament_cppcheck-release.tar.bz2
Source1:        ros-rpmlintrc

Requires:       cppcheck
Requires:       ros-humble
Requires:       ros-humble-ros-workspace

# Default BuildRequires Includes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes

# Generated BuildRequires Includes - Start
BuildRequires:  %{python_module devel}
BuildRequires:  ros-humble
BuildRequires:  ros-humble-ros-workspace
# Generated BuildRequires Includes - End


%description
The ability to perform static code analysis on C/C++ code using Cppcheck and
generate xUnit test result files.

%prep
%autosetup -p0 -n ament_cppcheck-release

%build
# 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/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
%pyproject_wheel

%install
# 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/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
export PIP_PREFIX="/opt/ros/humble"
%pyproject_install

# Disable checks - For now.
%if 0
%check
# Look for a directory with a name indicating that it contains tests
TEST_TARGET=$(ls -d * | grep -m1 "\(test\|tests\)" ||:)
if [ -n "$TEST_TARGET" ] && %__python3 -m pytest --version; 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/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
%__python3 -m pytest $TEST_TARGET || echo "RPM TESTS FAILED"
else echo "RPM TESTS SKIPPED"; fi
%endif

%files
/opt/ros/humble

%changelog
* Mon Mar 02 2026 Michael Jeronimo <michael.jeronimo@openrobotics.org> - 0.12.15-1
- Autogenerated by Bloom

openSUSE Build Service is sponsored by