scripts/build/debug/400-ltrace.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Dec 30 15:36:22 2009 +0100 (2009-12-30)
changeset 1669 61edd9d19e3c
parent 1147 86930cd9340a
child 1678 ac247da318a1
permissions -rw-r--r--
scripts/functions: add aria2, a powerfull downloader

aria2 is a powerfull downloader that is capable of chunking and
parallel retrieval.

Due to li;itations in crosstool-NG retrieval facilities, it's not possible
to take fully advantage of aria2. It might happen that, in the future,
those limitations get lifted away, so we can take use features such as
parallel downloading from more than one server at the same time. For now,
it should still speed up downloads thanks to parallel downloading of chunks.
     1 # Build script for ltrace
     2 
     3 do_debug_ltrace_get() {
     4     CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
     5     # Create a link so that the following steps are easier to do:
     6     cd "${CT_TARBALLS_DIR}"
     7     ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
     8     ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
     9 }
    10 
    11 do_debug_ltrace_extract() {
    12     CT_Extract "ltrace-${CT_LTRACE_VERSION}"
    13     CT_Patch "ltrace-${CT_LTRACE_VERSION}"
    14     # ltrace uses ppc instead of powerpc for the arch name
    15     # create a symlink to get it to build for powerpc
    16     CT_Pushd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/sysdeps/linux-gnu"
    17     CT_DoExecLog ALL ln -sf ppc powerpc
    18     CT_Popd
    19 }
    20 
    21 do_debug_ltrace_build() {
    22     CT_DoStep INFO "Installing ltrace"
    23     mkdir -p "${CT_BUILD_DIR}/build-ltrace"
    24     CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
    25 
    26     CT_DoLog EXTRA "Copying sources to build dir"
    27     (cd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}"; tar cf - .)| tar xvf - |CT_DoLog ALL
    28 
    29     CT_DoLog EXTRA "Configuring ltrace"
    30     CT_DoExecLog ALL        \
    31     ./configure             \
    32         --build=${CT_BUILD} \
    33         --host=${CT_TARGET} \
    34         --prefix=/usr
    35 
    36     CT_DoLog EXTRA "Building ltrace"
    37     CT_DoExecLog ALL make
    38 
    39     CT_DoLog EXTRA "Installing ltrace"
    40     CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
    41 
    42     CT_Popd
    43     CT_EndStep
    44 }
    45