From 18f8ccf8e6fbc2c23fc60cb43779ac32b05e2fc8 Mon Sep 17 00:00:00 2001 From: ebemunk Date: Wed, 30 Apr 2014 01:59:48 -0700 Subject: [PATCH] install scripts --- install_scripts/centos.sh | 62 +++++++++++++++++++++++++++++++++++++++ install_scripts/ubuntu.sh | 62 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 install_scripts/centos.sh create mode 100644 install_scripts/ubuntu.sh diff --git a/install_scripts/centos.sh b/install_scripts/centos.sh new file mode 100644 index 0000000..008602e --- /dev/null +++ b/install_scripts/centos.sh @@ -0,0 +1,62 @@ +#!/bin/bash +#provision a clean centos installation + +sudo su + +#update list first +yum -y update + +#install wget +yum -y install wget + +#fetch boost 1.55.0 and compile +wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download -O boost_1_55_0.tar.bz2 +tar --bzip2 -xf boost_1_55_0.tar.bz2 +cd boost_1_55_0 +./bootstrap.sh --with-libraries=system,filesystem,program_options +./b2 install --prefix=/usr + +#install opencv dependencies +yum install -y cmake gtk2-devel python-dev numpy libjpeg-devel libpng-devel libtiff-devel libjasper-devel + +#fetch opencv 2.4.9 and compile +cd .. +wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download -O opencv-2.4.9.zip +unzip opencv-2.4.9.zip +cd opencv-2.4.9 +mkdir release +cd release +cmake -D CMAKE_BUILD_TYPE=RELEASE \ +-D CMAKE_INSTALL_PREFIX=/usr \ +-D BUILD_opencv_flann=OFF \ +-D BUILD_opencv_features2d=OFF \ +-D BUILD_opencv_calib3d=OFF \ +-D BUILD_opencv_ml=OFF \ +-D BUILD_opencv_video=OFF \ +-D BUILD_opencv_objdetect=OFF \ +-D BUILD_opencv_contrib=OFF \ +-D BUILD_opencv_nonfree=OFF \ +-D BUILD_opencv_gpu=OFF \ +-D BUILD_opencv_legacy=OFF \ +-D BUILD_opencv_photo=OFF \ +-D BUILD_opencv_python=OFF \ +-D BUILD_opencv_stitching=OFF \ +-D BUILD_opencv_ts=OFF \ +-D BUILD_opencv_videostab=OFF \ +-D BUILD_opencv_apps=OFF \ +-D BUILD_TESTS=OFF \ +-D BUILD_PERF_TESTS=OFF \ +.. +make -j2 +make install +#update libs +ldconfig + +#good to compile from this point +cd ../.. +git clone https://github.com/ebemunk/phoenix.git +cd phoenix +#comment out the WIN variable in makefile +sed -i '38 s/^/#/' Makefile +export PKG_CONFIG_PATH=/usr/lib/pkgconfig +make \ No newline at end of file diff --git a/install_scripts/ubuntu.sh b/install_scripts/ubuntu.sh new file mode 100644 index 0000000..c578d68 --- /dev/null +++ b/install_scripts/ubuntu.sh @@ -0,0 +1,62 @@ +#!/bin/bash +#provision a clean ubuntu installation + +sudo su + +#update list first +apt-get update + +#install boost dependencies +apt-get install -y build-essential + +#fetch boost 1.55.0 and compile +wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download -O boost_1_55_0.tar.bz2 +tar --bzip2 -xf boost_1_55_0.tar.bz2 +cd boost_1_55_0 +./bootstrap.sh --with-libraries=system,filesystem,program_options +./b2 install + +#install opencv dependencies +apt-get install -y git cmake libgtk2.0 libgtk2.0-dev pkg-config python-dev python-numpy libjpeg-dev libpng-dev libtiff-dev libjasper-dev unzip + +#fetch opencv 2.4.9 and compile +cd .. +wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download -O opencv-2.4.9.zip +unzip opencv-2.4.9.zip +cd opencv-2.4.9 +mkdir release +cd release +cmake -D CMAKE_BUILD_TYPE=RELEASE \ +-D CMAKE_INSTALL_PREFIX=/usr/local \ +-D BUILD_opencv_flann=OFF \ +-D BUILD_opencv_features2d=OFF \ +-D BUILD_opencv_calib3d=OFF \ +-D BUILD_opencv_ml=OFF \ +-D BUILD_opencv_video=OFF \ +-D BUILD_opencv_objdetect=OFF \ +-D BUILD_opencv_contrib=OFF \ +-D BUILD_opencv_nonfree=OFF \ +-D BUILD_opencv_gpu=OFF \ +-D BUILD_opencv_legacy=OFF \ +-D BUILD_opencv_photo=OFF \ +-D BUILD_opencv_python=OFF \ +-D BUILD_opencv_stitching=OFF \ +-D BUILD_opencv_ts=OFF \ +-D BUILD_opencv_videostab=OFF \ +-D BUILD_opencv_apps=OFF \ +-D BUILD_TESTS=OFF \ +-D BUILD_PERF_TESTS=OFF \ +.. +make -j2 +make install + +#update libs +ldconfig + +#good to compile from this point +cd ../.. +git clone https://github.com/ebemunk/phoenix.git +cd phoenix +#comment out the WIN variable in makefile +sed -i '38 s/^/#/' Makefile +make \ No newline at end of file