%define debug_package %{nil} %define llvmver 4.0.1 Name: scylla-bcc05 Version: 0.5.0 Release: 1%{?dist} Summary: BPF Compiler Collection (BCC) Group: Development/Languages License: ASL 2.0 URL: https://github.com/iovisor/bcc Source0: https://github.com/iovisor/bcc/archive/v%{version}.tar.gz Source1: http://llvm.org/releases/%{llvmver}/llvm-%{llvmver}.src.tar.xz Source2: http://llvm.org/releases/%{llvmver}/cfe-%{llvmver}.src.tar.xz BuildArch: x86_64 BuildRequires: bison, cmake3, flex, gcc, gcc-c++, libxml2-devel, python2-devel, elfutils-libelf-devel-static %description Python bindings for BPF Compiler Collection (BCC). Control a BPF program from userspace. %prep %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} %build export LD_LIBRARY_PATH="%{_builddir}/usr/lib64" export PATH="%{_builddir}/usr/bin":$PATH # build llvm pushd %{_builddir}/llvm-%{llvmver}.src mkdir build cd build cmake3 .. -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;BPF" -DCMAKE_INSTALL_PREFIX=/usr make %{?_smp_mflags} make install DESTDIR="%{_builddir}" popd mkdir build pushd build cmake3 .. -DREVISION_LAST=%{version} -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/opt/scylladb pwd make %{?_smp_mflags} popd %install pushd build make install/strip DESTDIR=%{buildroot} %changelog * Fri Jul 03 2015 Brenden Blanco - 0.1.1-2 - Initial RPM Release %package -n libbcc Summary: Shared Library for BPF Compiler Collection (BCC) Requires: elfutils-libelf %description -n libbcc Shared Library for BPF Compiler Collection (BCC) %package -n libbcc-examples Summary: Examples for BPF Compiler Collection (BCC) Requires: libbcc %description -n libbcc-examples Examples for BPF Compiler Collection (BCC) %package -n python-bcc Summary: Python bindings for BPF Compiler Collection (BCC) Requires: libbcc %description -n python-bcc Python bindings for BPF Compiler Collection (BCC) %package -n bcc-tools Summary: Command line tools for BPF Compiler Collection (BCC) Requires: python-bcc %description -n bcc-tools Command line tools for BPF Compiler Collection (BCC) %files -n python-bcc /opt/scylladb//lib/python2.7/site-packages/bcc* %files -n libbcc /opt/scylladb/lib64/* /opt/scylladb/include/bcc/* %files -n libbcc-examples /opt/scylladb/share/bcc/examples/* %exclude /opt/scylladb/share/bcc/examples/*.pyc %exclude /opt/scylladb/share/bcc/examples/*.pyo %exclude /opt/scylladb/share/bcc/examples/*/*.pyc %exclude /opt/scylladb/share/bcc/examples/*/*.pyo %exclude /opt/scylladb/share/bcc/examples/*/*/*.pyc %exclude /opt/scylladb/share/bcc/examples/*/*/*.pyo %files -n bcc-tools /opt/scylladb/share/bcc/introspection/* /opt/scylladb/share/bcc/tools/* /opt/scylladb/share/bcc/man/*