]>
Commit | Line | Data |
---|---|---|
05220183 JP |
1 | Summary: Tool that generates a compilation database for clang tooling |
2 | Name: bear | |
b74f258d | 3 | Version: 3.0.21 |
05220183 JP |
4 | Release: 1 |
5 | License: GPL v3+ | |
6 | Group: Development/Building | |
7 | Source0: https://github.com/rizsotto/Bear/archive/%{version}/%{name}-%{version}.tar.gz | |
b74f258d | 8 | # Source0-md5: 662fec17c4ae56326bdec8e35198bec4 |
05220183 | 9 | URL: https://github.com/rizsotto/Bear |
b74f258d | 10 | BuildRequires: cmake >= 3.13 |
05220183 JP |
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) | |
26 | ||
27 | %description | |
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. | |
31 | ||
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. | |
35 | ||
36 | %prep | |
37 | %setup -q -n Bear-%{version} | |
38 | ||
39 | %build | |
40 | export CC="%{__cc}" | |
41 | export CXX="%{__cxx}" | |
42 | export CFLAGS="%{rpmcflags}" | |
43 | export CXXFLAGS="%{rpmcxxflags}" | |
44 | export CPPFLAGS="%{rpmcppflags}" | |
45 | export LDFLAGS="%{rpmldflags}" | |
46 | %cmake -B build \ | |
47 | -DCMAKE_INSTALL_BINDIR=%(realpath -m "--relative-to=%{_prefix}" "%{_bindir}") \ | |
48 | -DCMAKE_INSTALL_LIBDIR=%(realpath -m "--relative-to=%{_prefix}" "%{_libdir}") | |
49 | ||
50 | %{__make} -C build | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} -C build install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
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 | |
69 | %dir %{_libdir}/bear | |
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* |