forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spec and build script used in fedora buildbot
* These files are required to build the test rpm Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
- Loading branch information
Brenden Blanco
committed
Sep 4, 2015
1 parent
c07229e
commit 0d45b80
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
%define debug_package %{nil} | ||
|
||
Name: bcc | ||
Version: 0.1.6 | ||
Release: 1%{?dist} | ||
Summary: BPF Compiler Collection (BCC) | ||
|
||
Group: Development/Languages | ||
License: ASL 2.0 | ||
URL: https://github.com/iovisor/bcc | ||
Source0: bcc.tar.gz | ||
|
||
BuildArch: x86_64 | ||
BuildRequires: bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel | ||
|
||
%description | ||
Python bindings for BPF Compiler Collection (BCC). Control a BPF program from | ||
userspace. | ||
|
||
|
||
%prep | ||
%setup -n bcc | ||
|
||
%build | ||
|
||
mkdir build | ||
pushd build | ||
cmake .. -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/usr | ||
make -j`grep -c ^process /proc/cpuinfo` | ||
popd | ||
|
||
%install | ||
pushd build | ||
make install/strip 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) | ||
Requires: gcc, make | ||
%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-bcc | ||
Summary: Python bindings for BPF Compiler Collection (BCC) | ||
%description -n python-bcc | ||
Python bindings for BPF Compiler Collection (BCC) | ||
|
||
%files -n python-bcc | ||
%{python_sitelib}/bcc* | ||
%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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
TMP=$(mktemp -d /tmp/rpmbuild.XXXXXX) | ||
|
||
function cleanup() { | ||
[[ -d $TMP ]] && rm -rf $TMP | ||
} | ||
trap cleanup EXIT | ||
|
||
mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | ||
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/SOURCES/bcc.tar.gz | ||
cp SPECS/bcc.spec $TMP/SPECS/ | ||
pushd $TMP | ||
rpmbuild --define "_topdir `pwd`" -ba SPECS/bcc.spec | ||
popd | ||
|
||
cp $TMP/RPMS/*/*.rpm . | ||
cp $TMP/SRPMS/*.rpm . |