1 Summary: Tool that generates a compilation database for clang tooling
6 Group: Development/Building
7 Source0: https://github.com/rizsotto/Bear/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 662fec17c4ae56326bdec8e35198bec4
9 URL: https://github.com/rizsotto/Bear
10 BuildRequires: cmake >= 3.13
11 BuildRequires: gmock-devel >= 1.10
12 BuildRequires: grpc-devel >= 1.26
13 BuildRequires: gtest-devel >= 1.10
14 BuildRequires: libfmt-devel >= 6.1
15 BuildRequires: libstdc++-devel >= 6:5
16 BuildRequires: nlohmann-json-devel >= 3.7.3
17 BuildRequires: pkgconfig
18 BuildRequires: protobuf-devel >= 3.11
19 BuildRequires: rpmbuild(macros) >= 1.605
20 BuildRequires: spdlog-devel >= 1.5.0
21 Requires: grpc >= 1.26
22 Requires: libfmt >= 6.1
23 Requires: protobuf-libs >= 3.11
24 Requires: spdlog >= 1.5.0
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The JSON compilation database is used in the clang project to provide
29 information on how a single compilation unit is processed. With this,
30 it is easy to re-run the compilation with alternate programs.
32 Some build systems natively support generation of JSON compilation
33 database. For projects which do not use such build tool, Bear
34 generates the JSON file during build process.
37 %setup -q -n Bear-%{version}
42 export CFLAGS="%{rpmcflags}"
43 export CXXFLAGS="%{rpmcxxflags}"
44 export CPPFLAGS="%{rpmcppflags}"
45 export LDFLAGS="%{rpmldflags}"
47 -DCMAKE_INSTALL_BINDIR=%(realpath -m "--relative-to=%{_prefix}" "%{_bindir}") \
48 -DCMAKE_INSTALL_LIBDIR=%(realpath -m "--relative-to=%{_prefix}" "%{_libdir}")
53 rm -rf $RPM_BUILD_ROOT
55 %{__make} -C build install \
56 DESTDIR=$RPM_BUILD_ROOT
58 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
65 %doc CONTRIBUTING.md README.md
66 %attr(755,root,root) %{_bindir}/bear
67 %attr(755,root,root) %{_bindir}/citnames
68 %attr(755,root,root) %{_bindir}/intercept
70 %attr(755,root,root) %{_libdir}/bear/libexec.so
71 %attr(755,root,root) %{_libdir}/bear/wrapper
72 %dir %{_libdir}/bear/wrapper.d
73 %attr(755,root,root) %{_libdir}/bear/wrapper.d/*
74 %{_mandir}/man1/bear.1*
75 %{_mandir}/man1/citnames.1*
76 %{_mandir}/man1/intercept.1*