Blob Blame History Raw
Name:           bear
Version:        3.0.14
Release:        %autorelease
Summary:        Tool that generates a compilation database for clang tooling

License:        GPLv3+
URL:  {name}
Source:         %{url}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  cmake(fmt)
BuildRequires:  cmake(gtest)
BuildRequires:  cmake(nlohmann_json)
BuildRequires:  cmake(spdlog)
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  gmock-devel
BuildRequires:  grpc-plugins
BuildRequires:  make
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(grpc++)
BuildRequires:  python3

# Needed for (disabled) functional tests
# BuildRequires:  python3dist(lit)

# Work around RHBZ#1959600 (, which
# caused a test failure on s390x. It may only be happenstance that no other
# architectures were affected.
%global _lto_cflags %{nil}

Build ear produces compilation database in JSON format. This database describes
how single compilation unit should be processed and can be used by Clang

%autosetup -p 1 -n Bear-%{version}

# Functional tests are broken for some unknown reason, disable for now.


mv %{buildroot}/%{_docdir}/Bear %{buildroot}/%{_docdir}/bear

# Tests run as part of build, because it's the same build target.
# There is no check target.


# rpmbuild on RHEL won't automatically pick up &
%if 0%{?rhel}

%license COPYING
%doc %{_docdir}/bear