Home | History | Annotate | Download | only in doc
      1 Mini-Howto: Building LTP from Git
      2 =================================
      3 
      4 ******************************************************************************
      5 The following document briefly describes the single steps to build LTP from
      6 the Git repository located at GitHub.
      7 The instructions here were tested on a Ubuntu/precise Linux system (feel free
      8 to adapt to your distribution).
      9 
     10 Changelog:
     11  * Initial version: Sedat Dilek <sedat.dilek (a] gmail.com>
     12  * Embedded comments from Cyril Hrubis <chrubis (a] suse.cz>
     13 ******************************************************************************
     14 
     15 # Export language settings
     16 
     17 export LANG=C
     18 export LC_ALL=C
     19 
     20 # Set some useful variables (adapt if you dislike)
     21 
     22 WORKING_DIR="$HOME/src/ltp"
     23 
     24 PREFIX="/opt/ltp"
     25 
     26 GIT_URL="https://github.com/linux-test-project/ltp.git"
     27 
     28 MAKE_JOBS=$(getconf _NPROCESSORS_ONLN)
     29 
     30 BUILD_LOG_FILE="build-log.txt"
     31 INSTALL_LOG_FILE="install-log.txt"
     32 
     33 # PREREQS on Ubuntu (package-list is incomplete and may vary for other distros)
     34 
     35 sudo apt-get install build-essential
     36 sudo apt-get install autoconf automake autotools-dev m4
     37 sudo apt-get install git
     38 sudo apt-get install linux-headers-$(uname -r)
     39 sudo apt-get install libaio-dev libattr1-dev libcap-dev
     40 
     41 # Working directory
     42 
     43 mkdir -p $WORKING_DIR
     44 cd $WORKING_DIR
     45 
     46 # Get the LTP source
     47 
     48 git clone $GIT_URL ltp-git
     49 
     50 # Configure LTP
     51 
     52 cd ltp-git/
     53 make autotools
     54 ./configure --prefix=$PREFIX
     55 
     56 # Start building LTP
     57 
     58 make -j$MAKE_JOBS 2>&1 | tee ../$BUILD_LOG_FILE
     59 
     60 # Install LTP (requires superuser privileges)
     61 
     62 sudo make install 2>&1 | tee ../$INSTALL_LOG_FILE
     63