]> git.pld-linux.org Git - packages/bcc-bpf.git/blob - bcc-bpf.spec
update BR
[packages/bcc-bpf.git] / bcc-bpf.spec
1 #
2 # Conditional build:
3 %bcond_without  lua             # lua
4 %bcond_without  python  # python
5
6 # luajit is not available for some architectures
7 %ifnarch %{ix86} %{x8664} %{arm} mips ppc
8 %undefine       with_lua
9 %endif
10
11 Summary:        Tools for BPF-based Linux IO analysis, networking, monitoring, and more
12 Name:           bcc-bpf
13 Version:        0.7.0
14 Release:        0.1
15 License:        Apache v2.0
16 Group:          Applications
17 Source0:        https://github.com/iovisor/bcc/archive/v%{version}/bcc-%{version}.tar.gz
18 # Source0-md5:  79a445aa6542bcc260fd38af3402a77d
19 Patch0:         mandir.patch
20 URL:            https://iovisor.github.io/bcc/
21 BuildRequires:  bison
22 BuildRequires:  cmake >= 2.8.7
23 BuildRequires:  elfutils-libelf
24 BuildRequires:  elfutils-devel
25 BuildRequires:  flex
26 BuildRequires:  gcc
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  llvm-devel
29 BuildRequires:  clang-devel
30 BuildRequires:  ncurses-devel
31 %{?with_lua:BuildRequires: pkgconfig(luajit)}
32 BuildRequires:  python-devel
33 ExclusiveArch:  %{ix86} %{x8664} power64
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 BCC is a toolkit for creating efficient kernel tracing and
38 manipulation programs, and includes several useful tools and examples.
39 It makes use of extended BPF (Berkeley Packet Filters), formally known
40 as eBPF, a new feature that was first added to Linux 3.15. BCC makes
41 BPF programs easier to write, with kernel instrumentation in C (and
42 includes a C wrapper around LLVM), and front-ends in Python and LUA.
43
44 It is suited for many tasks, including performance analysis and
45 network traffic control.
46
47 %package libs
48 Summary:        Shared Library for BPF Compiler Collection (BCC)
49 Group:          Libraries
50
51 %description libs
52 Shared Library for BPF Compiler Collection (BCC)
53
54 %package devel
55 Summary:        Shared library for BPF Compiler Collection (BCC)
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58
59 %description devel
60 The %{name}-devel package contains libraries and header files for
61 developing application that use BPF Compiler Collection (BCC).
62
63 %package -n python-%{name}
64 Summary:        Python bindings to %{name}
65 Group:          Libraries/Python
66 Requires:       %{name}-libs = %{version}-%{release}
67
68 %description -n python-%{name}
69 Python bindings for BPF Compiler Collection (BCC)
70
71 %package tools
72 Summary:        Tools for BPF Compiler Collection (BCC)
73 Group:          Applications
74 Requires:       %{name}-libs = %{version}-%{release}
75
76 %description tools
77 Command line tools for BPF Compiler Collection (BCC)
78
79 %package -n lua-%{name}
80 Summary:        LUA bindings to %{name}
81 Group:          Applications
82 Requires:       %{name}-libs = %{version}-%{release}
83
84 %description -n lua-%{name}
85 Standalone tool to run BCC tracers written in Lua
86
87 %prep
88 %setup -q -n bcc-%{version}
89 %patch0 -p1
90
91 %build
92 install -d build
93 cd build
94 %cmake \
95         -DREVISION=%{version} \
96         -DREVISION_LAST=%{version} \
97         ..
98 %{__make}
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 %{__make} -C build install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/bcc/tools/old
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   libs -p /sbin/ldconfig
111 %postun libs -p /sbin/ldconfig
112
113 %files libs
114 %defattr(644,root,root,755)
115 %doc README.md
116 %attr(755,root,root) %{_libdir}/libbcc.so.*.*.*
117 %ghost %{_libdir}/libbcc.so.0
118 %attr(755,root,root) %{_libdir}/libbpf.so.*.*.*
119 %ghost %{_libdir}/libbpf.so.0
120
121 %files devel
122 %defattr(644,root,root,755)
123 %{_libdir}/libbpf.so
124 %{_libdir}/libbcc.so
125 %{_includedir}/bcc
126 %{_pkgconfigdir}/libbcc.pc
127
128 %files tools
129 %defattr(644,root,root,755)
130 %dir %{_datadir}/bcc
131 %{_datadir}/bcc/examples
132 %{_datadir}/bcc/introspection
133 %{_datadir}/bcc/tools
134 %{_mandir}/man8/argdist.8*
135 %{_mandir}/man8/bashreadline.8*
136 %{_mandir}/man8/biolatency.8*
137 %{_mandir}/man8/biosnoop.8*
138 %{_mandir}/man8/biotop.8*
139 %{_mandir}/man8/bitesize.8*
140 %{_mandir}/man8/bpflist.8*
141 %{_mandir}/man8/bps.8*
142 %{_mandir}/man8/btrfsdist.8*
143 %{_mandir}/man8/btrfsslower.8*
144 %{_mandir}/man8/cachestat.8*
145 %{_mandir}/man8/cachetop.8*
146 %{_mandir}/man8/capable.8*
147 %{_mandir}/man8/cobjnew.8*
148 %{_mandir}/man8/cpudist.8*
149 %{_mandir}/man8/cpuunclaimed.8*
150 %{_mandir}/man8/criticalstat.8*
151 %{_mandir}/man8/dbslower.8*
152 %{_mandir}/man8/dbstat.8*
153 %{_mandir}/man8/dcsnoop.8*
154 %{_mandir}/man8/dcstat.8*
155 %{_mandir}/man8/deadlock_detector.8*
156 %{_mandir}/man8/execsnoop.8*
157 %{_mandir}/man8/ext4dist.8*
158 %{_mandir}/man8/ext4slower.8*
159 %{_mandir}/man8/filelife.8*
160 %{_mandir}/man8/fileslower.8*
161 %{_mandir}/man8/filetop.8*
162 %{_mandir}/man8/funccount.8*
163 %{_mandir}/man8/funclatency.8*
164 %{_mandir}/man8/funcslower.8*
165 %{_mandir}/man8/gethostlatency.8*
166 %{_mandir}/man8/hardirqs.8*
167 %{_mandir}/man8/inject.8*
168 %{_mandir}/man8/javacalls.8*
169 %{_mandir}/man8/javaflow.8*
170 %{_mandir}/man8/javagc.8*
171 %{_mandir}/man8/javaobjnew.8*
172 %{_mandir}/man8/javastat.8*
173 %{_mandir}/man8/javathreads.8*
174 %{_mandir}/man8/killsnoop.8*
175 %{_mandir}/man8/llcstat.8*
176 %{_mandir}/man8/mdflush.8*
177 %{_mandir}/man8/memleak.8*
178 %{_mandir}/man8/mountsnoop.8*
179 %{_mandir}/man8/mysqld_qslower.8*
180 %{_mandir}/man8/nfsdist.8*
181 %{_mandir}/man8/nfsslower.8*
182 %{_mandir}/man8/nodegc.8*
183 %{_mandir}/man8/nodestat.8*
184 %{_mandir}/man8/offcputime.8*
185 %{_mandir}/man8/offwaketime.8*
186 %{_mandir}/man8/oomkill.8*
187 %{_mandir}/man8/opensnoop.8*
188 %{_mandir}/man8/phpcalls.8*
189 %{_mandir}/man8/phpflow.8*
190 %{_mandir}/man8/phpstat.8*
191 %{_mandir}/man8/pidpersec.8*
192 %{_mandir}/man8/profile.8*
193 %{_mandir}/man8/pythoncalls.8*
194 %{_mandir}/man8/pythonflow.8*
195 %{_mandir}/man8/pythongc.8*
196 %{_mandir}/man8/pythonstat.8*
197 %{_mandir}/man8/reset-trace.8*
198 %{_mandir}/man8/rubycalls.8*
199 %{_mandir}/man8/rubyflow.8*
200 %{_mandir}/man8/rubygc.8*
201 %{_mandir}/man8/rubyobjnew.8*
202 %{_mandir}/man8/rubystat.8*
203 %{_mandir}/man8/runqlat.8*
204 %{_mandir}/man8/runqlen.8*
205 %{_mandir}/man8/runqslower.8*
206 %{_mandir}/man8/slabratetop.8*
207 %{_mandir}/man8/softirqs.8*
208 %{_mandir}/man8/sslsniff.8*
209 %{_mandir}/man8/stackcount.8*
210 %{_mandir}/man8/statsnoop.8*
211 %{_mandir}/man8/syncsnoop.8*
212 %{_mandir}/man8/syscount.8*
213 %{_mandir}/man8/tcpaccept.8*
214 %{_mandir}/man8/tcpconnect.8*
215 %{_mandir}/man8/tcpconnlat.8*
216 %{_mandir}/man8/tcpdrop.8*
217 %{_mandir}/man8/tcplife.8*
218 %{_mandir}/man8/tcpretrans.8*
219 %{_mandir}/man8/tcpstates.8*
220 %{_mandir}/man8/tcpsubnet.8*
221 %{_mandir}/man8/tcptop.8*
222 %{_mandir}/man8/tcptracer.8*
223 %{_mandir}/man8/tplist.8*
224 %{_mandir}/man8/trace.8*
225 %{_mandir}/man8/ttysnoop.8*
226 %{_mandir}/man8/ucalls.8*
227 %{_mandir}/man8/uflow.8*
228 %{_mandir}/man8/ugc.8*
229 %{_mandir}/man8/uobjnew.8*
230 %{_mandir}/man8/ustat.8*
231 %{_mandir}/man8/uthreads.8*
232 %{_mandir}/man8/vfscount.8*
233 %{_mandir}/man8/vfsstat.8*
234 %{_mandir}/man8/wakeuptime.8*
235 %{_mandir}/man8/xfsdist.8*
236 %{_mandir}/man8/xfsslower.8*
237 %{_mandir}/man8/zfsdist.8*
238 %{_mandir}/man8/zfsslower.8*
239
240 %if %{with lua}
241 %files -n lua-%{name}
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/bcc-lua
244 %endif
245
246 %if %{with python}
247 %files -n python-%{name}
248 %defattr(644,root,root,755)
249 %{py_sitedir}/bcc
250 %{py_sitedir}/bcc-*-py*.egg-info
251 %endif
This page took 0.070108 seconds and 3 git commands to generate.