scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Sep 04 17:27:16 2009 +0200 (2009-09-04)
changeset 1512 439a6b292917
parent 1245 96d74832c40b
child 1678 ac247da318a1
permissions -rw-r--r--
TODO: update

Add TODO list for m4, autoconf, automake and libtool.
Building our own versions would remove burden from the users
who have older versions on their distributions, and are not
ready/able/allowed to upgrade.
     1 # This will build and install sstrip to run on host and sstrip target files
     2 
     3 case "${CT_SSTRIP_FROM}" in
     4     ELFkickers)
     5         do_tools_sstrip_get() {
     6             CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
     7                        http://www.muppetlabs.com/~breadbox/pub/software
     8         }
     9         do_tools_sstrip_extract() {
    10             CT_Extract "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    11             CT_Patch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    12         }
    13         do_tools_sstrip_build() {
    14             CT_DoStep INFO "Installing sstrip"
    15             mkdir -p "${CT_BUILD_DIR}/build-strip"
    16             cd "${CT_BUILD_DIR}/build-strip"
    17             ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
    18 
    19             CT_DoLog EXTRA "Building sstrip"
    20             CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
    21             
    22             CT_DoLog EXTRA "Installing sstrip"
    23             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    24 
    25             CT_EndStep
    26         }
    27     ;;
    28 
    29     buildroot)
    30         do_tools_sstrip_get() {
    31             CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
    32         }
    33         do_tools_sstrip_extract() {
    34             # We leave the sstrip maintenance to the buildroot people:
    35             # -> any fix-up goes directly there
    36             # -> we don't have patches for it
    37             # -> we don't need to patch it
    38             # -> just create a directory in src/, and copy it there.
    39             CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
    40             CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    41         }
    42         do_tools_sstrip_build() {
    43             CT_DoStep INFO "Installing sstrip"
    44             mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    45             cd "${CT_BUILD_DIR}/build-sstrip"
    46 
    47             CT_DoLog EXTRA "Building sstrip"
    48             CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    49 
    50             CT_DoLog EXTRA "Installing sstrip"
    51             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    52 
    53             CT_EndStep
    54         }
    55     ;;
    56 
    57     *)  do_tools_sstrip_get() {
    58             :
    59         }
    60         do_tools_sstrip_extract() {
    61             :
    62         }
    63         do_tools_sstrip_build() {
    64             :
    65         }
    66     ;;
    67 esac