summaryrefslogtreecommitdiff
path: root/ament-clang-format.spec
blob: f59142680d75e2980ad8c96d11321aacaebcfb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%define ros_distro humble
%define RosPkgName ament-clang-format
%define src_version 0.12.5

Name:           ros-%{ros_distro}-%{RosPkgName}
Version:        0.12.5
Release:        1%{?dist}
Summary:        The ability to check code against style conventions using clang-format and gene
License:        Apache License 2.0
URL:            https://github.com/ament/ament_lint/tree/humble
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:  clang
BuildRequires:  python3-yaml
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

Requires:       clang
Requires:       python3-yaml

Provides:       %{name}-devel = %{version}-%{release}
Provides:       %{name}-doc = %{version}-%{release}
Provides:       %{name}-runtime = %{version}-%{release}

%description
The ability to check code against style conventions using
    clang-format and generate xUnit test result files.

%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}
cd ament_clang_format
%{__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}
cd ament_clang_format
%{__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
* Sat Sep 19 2026 ai-importer <ai-importer@openeuler.org> - 0.12.5-1
- Initial import (ROS batch)