wiki:WgetBuildInstruction

Wget Build Instruction


This build instruction is only tested under ubuntu 13.04. The code that is around by ''' ''' should be substitute by correct folder name or file name. "<enter>" means "hit enter key".

  1. Download wget source code:http://ftp.gnu.org/gnu/wget/?C=M;O=D
  2. Extract source code to $LIND_SRC
  3. Copy and paste the bash script and save it to $LIND_SRC/misc folder:
#!/bin/bash

export PACKAGE_NAME=wget
export NACL_ARCH=x86_64
export NACL_GLIBC=1
export NACLPORTS_PREFIX=${REPY_PATH}/usr

source ../naclports/src/build_tools/common.sh

export NACL_SEL_LDR
export NACL_IRT
export NACL_SDK_LIB
export CC=${NACLCC}
export CXX=${NACLCXX}
export AR=${NACLAR}
export RANLIB=${NACLRANLIB}
export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig
export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR}
export FREETYPE_CONFIG=${NACLPORTS_PREFIX_BIN}/freetype-config
export PATH=${NACL_BIN_PATH}:${PATH};
conf_host=${NACL_CROSS_PREFIX}

Banner "Configure wget"
ChangeDir "../'''Change it wget source code folder!'''"
./configure\
     --prefix=${NACLPORTS_PREFIX} --host=x86_64-linux --with-ssl=openssl --disable-ipv6 ac_cv_func_sigaction=yes
make clean
make

  1. In terminal, give this script file execute permission and execute it:
    cd $LIND_SRC/misc<enter>
    chmod +x '''YourScriptFile'''<enter>
    ./'''YourScriptFile'''<enter>
    
  2. If no error reported, then type:
    cd $LIND_SRC/'''WgetSourceFolder'''<enter>
    make install<enter>
    
  3. Make a new folder "etc" under $REPY_PATH
  4. Copy below files from your Linux /etc folder to $REPY_PATH/etc folder
    /etc/host.conf
    /etc/hosts
    /etc/ld.so.conf
    /etc/localtime
    /etc/nsswitch.conf
    /etc/passwd
    /etc/resolv.conf
    
  5. In terminal, copy files into lind filesystem:
    cd $REPY_PATH/repy<enter>
    python lind_fs_utils.py update $REPY_PATH usr lib etc<enter>
    
  6. When copy finished, you can run wget under Lind as below:
     ../bin/sel_ldr -a -s -- ../lib/glibc/runnable-ld.so --library-path /lib/glibc:/usr/lib usr/bin/wget.nexe ['''OPTION'''] '''url'''
    
Last modified 4 years ago Last modified on Sep 15, 2013 12:27:04 PM