Commit fc9bc487 authored by Brendan Gregg's avatar Brendan Gregg

Merge remote-tracking branch 'upstream/master'

parents 921008e0 20d41cbc
FROM centos:6
MAINTAINER Brenden Blanco <bblanco@plumgrid.com>
RUN yum -y install @rpm-development-tools @c-development @development-tools cmake libstdc++-static
RUN yum -y install bison bzip2 file flex gcc gcc-c++ git glibc-devel glibc-devel glibc-utils libgcc svn tar texinfo-tex wget zip zlib-devel
WORKDIR /root
RUN svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_5_1_0_release/ && cd gcc_5_1_0_release && ./contrib/download_prerequisites
RUN mkdir gcc_5_1_0_release_build && cd gcc_5_1_0_release_build && ../gcc_5_1_0_release/configure --disable-multilib && make -j8 && make install
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/usrLocalLib64.conf && ldconfig
RUN wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz && tar zxf Python-2.7.10.tgz && cd Python-2.7.10 && ./configure && make -j8 && make install
RUN git clone https://github.com/llvm-mirror/llvm.git llvm && git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang && mkdir llvm/build
RUN cd llvm/build && cmake .. -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;BPF" && make -j$(grep -c ^process /proc/cpuinfo)
COPY ./ /root/bcc/
RUN rm /etc/ld.so.conf.d/usrLocalLib64.conf && ldconfig
#RUN mkdir bcc/build && cd bcc/build && cmake .. -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/root/llvm/build && make -j8
RUN yum -y install rpm-build python2-devel
%define debug_package %{nil}
Name: bcc
Version: @REVISION@
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}.zip
BuildArch: x86_64
BuildRequires: python2-devel, cmake >= 2.8.7, flex, bison
%description
Python bindings for BPF Compiler Collection (BCC). Control a BPF program
from userspace.
%prep
%setup -n bcc-%{version}
%build
mkdir build
cd build
cmake .. -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ -DCMAKE_PREFIX_PATH=/root/llvm/build
make -j8
%install
cd build
make install DESTDIR=%{buildroot}
%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)
%package -n python-bpf
Summary: Python bindings for BPF Compiler Collection (BCC)
%description -n python-bpf
Python bindings for BPF Compiler Collection (BCC)
%files -n python-bpf
%{python_sitelib}/bpf*
%exclude %{python_sitelib}/*.egg-info
/usr/bin/bpf-run
%files -n libbcc
/usr/lib64/*
/usr/share/bcc/include/*
/usr/include/bcc/*
%files -n libbcc-examples
/usr/share/bcc/examples/*
#rpmbuild --define "_topdir `pwd`" -ba SPECS/bcc.spec
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment