WIP: rpm packaging
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a53049..c5a268c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@
set(LIBSUFFIX 64)
endif()
+if(NOT PYTHON_ONLY)
find_package(BISON)
find_package(FLEX)
find_package(LLVM REQUIRED CONFIG)
@@ -42,6 +43,7 @@
set(CMAKE_C_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
+endif()
add_subdirectory(scripts)
add_subdirectory(src)
diff --git a/scripts/bpf_demo.ks.erb b/scripts/bpf_demo.ks.erb
index a285864..7fd843d 100644
--- a/scripts/bpf_demo.ks.erb
+++ b/scripts/bpf_demo.ks.erb
@@ -108,15 +108,19 @@
cat > /usr/local/bin/bcc-setup <<'DELIM__'
#!/bin/bash
set -e -x
+
+git clone https://github.com/svinota/pyroute2.git
+(cd pyroute2; make install)
+
numcpu=$(grep -c ^processor /proc/cpuinfo)
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build/
cd bcc/build/
+git checkout bblanco_dev
export PATH=/opt/local/llvm/bin:$PATH
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j$numcpu
-make test
DELIM__
chmod +x /usr/local/bin/bcc-setup
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0490c19..4b7a8d2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,5 +7,7 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
+if(NOT PYTHON_ONLY)
add_subdirectory(cc)
+endif()
add_subdirectory(python)