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