Stage2 semble compléter ok
[hvlinux.git] / stage1 / install-1
index d2a720d..a7bd542 100755 (executable)
@@ -1,51 +1,22 @@
-#!/bin/sh
-
-source ~/.bashrc
+#!/bin/bash
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
 source ../functions
+hvtrap_setup
 source ../packages-list
 
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage1"
-export LFS_LOG_DIR=${LFS}/var/log/hvlinux-install/stage1
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="${LFS}/tmp"
-
 init_log_file
 
-export CFLAGS="-pipe -march=${MACHINE_ARCHITECTURE} -O2"
-export CXXFLAGS=${CFLAGS}
+rscr mult "Performing pre-install" pre-install
 
-ipkg_ac        ${GMP} "--enable-cxx --enable-mpbsd ABI=32"
-ipkg_ac        ${MPFR} "--enable-shared"
+# Logging-in as 'lfs' user, and executing the install-2 script. The
+# 'su -' command starts with a clean environment and enters the home
+# directory of the user.
+su - lfs -c "cd ${PWD}; ./install-2"
 
-ipkg_mult      ${BINUTILS} cis-binutils-pass1 "${BINUTILS}-pass1"
-ipkg_mult      ${GCC_CORE} cis-gcc-pass1 "${GCC_CORE}-pass1"
-ipkg           ${KERNEL} cis-linux-api-headers
-ipkg           ${GLIBC} cis-glibc
-run_script_log "Toolchain-adjust-stage1" cis-toolchain-adjust
-ipkg_mult      ${GCC_CORE} cis-gcc-pass2 "${GCC_CORE}-pass2"
-ipkg_mult      ${BINUTILS} cis-binutils-pass2 "${BINUTILS}-pass2"
-ipkg_ac        ${NCURSES} "--with-shared --without-debug --without-ada --enable-overwrite"
-ipkg           ${BASH} cis-bash
-ipkg           ${BZIP2} cis-bzip2
-ipkg_ac        ${COREUTILS}
-ipkg_ac        ${DIFFUTILS}
-ipkg_ac        ${FINDUTILS}
-ipkg_ac        ${GAWK}
-ipkg           ${GETTEXT} cis-gettext
-ipkg_ac        ${GREP} "--disable-perl-regexp"
-ipkg_ac        ${GZIP}
-ipkg_ac        ${MAKE_PACKAGE}
-ipkg_ac        ${PATCH_PACKAGE}
-ipkg           ${PERL} cis-perl
-ipkg_ac        ${SED}
-ipkg_ac        ${TAR_PACKAGE}
-ipkg_ac        ${TEXINFO}
-ipkg           ${UTIL_LINUX} cis-util-linux
-run_script_log "Stripping" cis-stripping
+rscr mult "Performing post-install" post-install
 
 echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
 
-exit $?
+exit 0