bcc.el7.spec 2.09 KB
Newer Older
1
%define debug_package %{nil}
2
%define llvmver 3.7.0
3 4

Name:           bcc
5
Version:        0.1.6
6 7 8 9 10 11
Release:        1%{?dist}
Summary:        BPF Compiler Collection (BCC)

Group:          Development/Languages
License:        ASL 2.0
URL:            https://github.com/iovisor/bcc
12
Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
13 14
Source1:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
Source2:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
15 16

BuildArch:      x86_64
17
BuildRequires:  bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel
18 19

%description
20 21
Python bindings for BPF Compiler Collection (BCC). Control a BPF program from
userspace.
22 23 24


%prep
25 26 27 28
%setup -T -b 1 -n llvm-%{llvmver}.src
mkdir tools/clang
tar -xvvJf %{_sourcedir}/cfe-%{llvmver}.src.tar.xz -C tools/clang --strip 1
%setup -D -n bcc-%{version}
29 30

%build
31 32 33 34 35 36

export LD_LIBRARY_PATH="%{_builddir}/usr/lib64"
export PATH="%{_builddir}/usr/bin":$PATH

# build llvm
pushd %{_builddir}/llvm-%{llvmver}.src
37 38
mkdir build
cd build
39 40 41 42 43 44 45 46 47 48
../configure --disable-assertions --enable-optimized --prefix="%{_builddir}/usr"
make -j`grep -c ^process /proc/cpuinfo`
make install
popd

mkdir build
pushd build
cmake .. -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/usr
make -j`grep -c ^process /proc/cpuinfo`
popd
49 50

%install
51 52
pushd build
make install/strip DESTDIR=%{buildroot}
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

%changelog
* Fri Jul 03 2015 Brenden Blanco <bblanco@plumgrid.com> - 0.1.1-2
- Initial RPM Release

%package -n libbcc
Summary: Shared Library for BPF Compiler Collection (BCC)
%description -n libbcc
Shared Library for BPF Compiler Collection (BCC)

%package -n libbcc-examples
Summary: Examples for BPF Compiler Collection (BCC)
%description -n libbcc-examples
Examples for BPF Compiler Collection (BCC)

68
%package -n python-bcc
69
Summary: Python bindings for BPF Compiler Collection (BCC)
70
%description -n python-bcc
71 72
Python bindings for BPF Compiler Collection (BCC)

73 74
%files -n python-bcc
%{python_sitelib}/bcc*
75 76 77 78 79 80 81 82 83
%exclude %{python_sitelib}/*.egg-info

%files -n libbcc
/usr/lib64/*
/usr/share/bcc/include/*
/usr/include/bcc/*

%files -n libbcc-examples
/usr/share/bcc/examples/*