File Bear.spec of Package Bear

#
# spec file for package Bear
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%bcond_with     tests
Name:           Bear
Version:        4.0.0
Release:        0
Summary:        Tool to generate compilation database for clang tooling
License:        GPL-3.0-or-later
URL:            https://github.com/rizsotto/Bear
Source:        %{URL}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cargo
BuildRequires:  cargo-packaging
ExclusiveArch:  %{rust_tier1_arches}

%description
Bear is a tool to generate compilation database for clang tooling.

One way to get compilation database is to use CMake as build tool. When the
project compiles with a different build system, there is no free JSON
file. Bear is a tool to generate such file during the build process.

%prep
%autosetup

%build
%{cargo_build} --all-features

%install
%{cargo_install} --all-features

%files
%license COPYING
%doc README.md
%{_bindir}/bear
%{_mandir}/man1/bear.1%{?ext_man}
%{_mandir}/man1/bear-citnames.1%{?ext_man}
%{_mandir}/man1/bear-intercept.1%{?ext_man}
%{_libdir}/bear/

%changelog
openSUSE Build Service is sponsored by